Fix paste not overwriting selections

This commit is contained in:
Nicolas Werner 2021-04-15 01:45:18 +02:00
parent 84b2cf08a1
commit 3022178334
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -274,6 +274,7 @@ Rectangle {
Connections { Connections {
ignoreUnknownSignals: true ignoreUnknownSignals: true
onInsertText: { onInsertText: {
messageInput.remove(messageInput.selectionStart, messageInput.selectionEnd);
messageInput.insert(messageInput.cursorPosition, text); messageInput.insert(messageInput.cursorPosition, text);
} }
onTextChanged: { onTextChanged: {