diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index b95d47693174159e8e47ff855bfba3dd022b14d0..67ca7f3c2c2054255a0f5b71dc73d816085cf7ff 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -157,13 +157,13 @@ Rectangle { else lastChar = '' if (lastChar == '@') { - messageInput.openCompleter(selectionStart, "user"); + messageInput.openCompleter(selectionStart-1, "user"); } else if (lastChar == ':') { - messageInput.openCompleter(selectionStart, "emoji"); + messageInput.openCompleter(selectionStart-1, "emoji"); } else if (lastChar == '#') { - messageInput.openCompleter(selectionStart, "roomAliases"); + messageInput.openCompleter(selectionStart-1, "roomAliases"); } else if (lastChar == "~") { - messageInput.openCompleter(selectionStart, "customEmoji"); + messageInput.openCompleter(selectionStart-1, "customEmoji"); } } onCursorPositionChanged: {