First working autocomplete.
This commit is contained in:
parent
98b99e49f2
commit
41107bc99b
|
@ -41,7 +41,7 @@ Rectangle {
|
||||||
|
|
||||||
id: userAutoComplete
|
id: userAutoComplete
|
||||||
|
|
||||||
visible: isAutoCompleting
|
visible: isAutoCompleting && autoCompleteModel.length !== 0
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
id: userAutoCompleteListView
|
id: userAutoCompleteListView
|
||||||
|
@ -213,7 +213,9 @@ Rectangle {
|
||||||
repeatTimer.start()
|
repeatTimer.start()
|
||||||
currentRoom.cachedInput = text
|
currentRoom.cachedInput = text
|
||||||
|
|
||||||
if (cursorPosition < autoCompleteBeginPosition || cursorPosition > autoCompleteEndPosition) isAutoCompleting = false
|
if (cursorPosition !== autoCompleteBeginPosition && cursorPosition !== autoCompleteEndPosition) {
|
||||||
|
isAutoCompleting = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function postMessage(text) {
|
function postMessage(text) {
|
||||||
|
|
Loading…
Reference in New Issue