From 9bab0e73c267b6ed8eb12d077799385a5657a67b Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Sat, 1 Aug 2026 13:00:24 +0200 Subject: [PATCH] fix: use promptInput.text instead of bare text in root-level autocomplete functions --- gui/main.qml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gui/main.qml b/gui/main.qml index 4bb631d..30b7b04 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -137,8 +137,8 @@ ApplicationWindow { if (_acMatches.length > 0) { var lcp = acLCP(_acMatches) if (lcp.length > prefix.length) { - text = _acBase + lcp - cursorPosition = text.length + promptInput.text = _acBase + lcp + promptInput.cursorPosition = promptInput.text.length } } else { // No options — transition to done immediately @@ -152,16 +152,16 @@ ApplicationWindow { function acCycle() { if (!_acActive || _acMatches.length <= 1) return _acMatchIndex = (_acMatchIndex + 1) % _acMatches.length - var parts = text.substring(text.lastIndexOf("/") + 1).split(" ") + var parts = promptInput.text.substring(promptInput.text.lastIndexOf("/") + 1).split(" ") parts[0] = _acMatches[_acMatchIndex] - text = _acBase + "/" + parts.join(" ") - cursorPosition = text.length + promptInput.text = _acBase + "/" + parts.join(" ") + promptInput.cursorPosition = promptInput.text.length } function acCancel() { if (!_acActive) return - text = _acBase + _acTyped - cursorPosition = text.length + promptInput.text = _acBase + _acTyped + promptInput.cursorPosition = promptInput.text.length _acActive = false _acBase = "" _acTyped = ""