diff --git a/imports/Spectral/Panel/RoomPanelInput.qml b/imports/Spectral/Panel/RoomPanelInput.qml index d2af892..a0b588d 100644 --- a/imports/Spectral/Panel/RoomPanelInput.qml +++ b/imports/Spectral/Panel/RoomPanelInput.qml @@ -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)