Fix moving cursor.

square-messages
Black Hat 2018-10-22 21:16:43 +08:00
parent 7ceb391621
commit d9e778fe0c
1 changed files with 2 additions and 2 deletions

View File

@ -177,8 +177,8 @@ Rectangle {
if (event.modifiers & Qt.ShiftModifier) {
insert(cursorPosition, "\n")
} else if (userAutoComplete.visible) {
text = text.substring(0, text.lastIndexOf(" "));
insert(cursorPosition, userAutoCompleteListView.currentItem.displayName)
remove(text.lastIndexOf(" ") + 1, text.length)
insert(cursorPosition, userAutoCompleteListView.currentItem.displayName + " ")
userAutoComplete.visible = false
} else {
postMessage(text)