summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-11-24 03:06:24 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 19:05:12 +0100
commit90ce4f23abe752134346f7e90d4251f4922f50b4 (patch)
tree423356ad038f2bbbbadcb3f0a48233b954f97bc7 /resources/qml
parentFix completer fuzzy match not applying after prefix match and insert being br... (diff)
downloadnheko-90ce4f23abe752134346f7e90d4251f4922f50b4.tar.xz
Fix index out of range on backspace in completer
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/MessageInput.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml

index ac91e46c..4f5b4b4c 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml
@@ -81,6 +81,9 @@ Rectangle { completerTriggeredAt = -1; popup.close(); } + if (popup.opened) + popup.completer.setSearchString(textArea.getText(completerTriggeredAt, cursorPosition)); + } onSelectionStartChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text) onSelectionEndChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text) @@ -132,9 +135,6 @@ Rectangle { textArea.clear(); event.accepted = true; } - if (popup.opened) - popup.completer.setSearchString(textArea.getText(completerTriggeredAt, cursorPosition) + event.text); - } Connections {