summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-01-27 20:26:54 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-01-27 20:26:54 +0100
commit73244afdb8581f61967fab6663564d3b68ee9b99 (patch)
tree96a3ace3fe89dc85d2325192b1bdc67f5699c0be /resources
parentUpdate new translations (diff)
downloadnheko-73244afdb8581f61967fab6663564d3b68ee9b99.tar.xz
Fix username completion deleting characters before it
fixes #421
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/MessageInput.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index 35ebe488..cb7d383f 100644
--- a/resources/qml/MessageInput.qml
+++ b/resources/qml/MessageInput.qml
@@ -206,9 +206,12 @@ Rectangle {
                             while (pos > -1) {
                                 var t = messageInput.getText(pos, pos + 1);
                                 console.log('"' + t + '"');
-                                if (t == '@' || t == ' ' || t == '\t') {
+                                if (t == '@') {
                                     messageInput.openCompleter(pos, "user");
                                     return ;
+                                } else if (t == ' ' || t == '\t') {
+                                    messageInput.openCompleter(pos + 1, "user");
+                                    return ;
                                 } else if (t == ':') {
                                     messageInput.openCompleter(pos, "emoji");
                                     return ;