diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-01-27 20:26:54 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-01-27 20:26:54 +0100 |
commit | 73244afdb8581f61967fab6663564d3b68ee9b99 (patch) | |
tree | 96a3ace3fe89dc85d2325192b1bdc67f5699c0be /resources | |
parent | Update new translations (diff) | |
download | nheko-73244afdb8581f61967fab6663564d3b68ee9b99.tar.xz |
Fix username completion deleting characters before it
fixes #421
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/MessageInput.qml | 5 |
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 ; |