First working autocomplete.

square-messages
Black Hat 2018-10-23 11:51:46 +08:00
parent 98b99e49f2
commit 41107bc99b
1 changed files with 4 additions and 2 deletions

View File

@ -41,7 +41,7 @@ Rectangle {
id: userAutoComplete
visible: isAutoCompleting
visible: isAutoCompleting && autoCompleteModel.length !== 0
contentItem: ListView {
id: userAutoCompleteListView
@ -213,7 +213,9 @@ Rectangle {
repeatTimer.start()
currentRoom.cachedInput = text
if (cursorPosition < autoCompleteBeginPosition || cursorPosition > autoCompleteEndPosition) isAutoCompleting = false
if (cursorPosition !== autoCompleteBeginPosition && cursorPosition !== autoCompleteEndPosition) {
isAutoCompleting = false
}
}
function postMessage(text) {