Repository navigation
Conversation
The query was a Text with a hand-drawn fake caret: every key was appended or removed at the end of the string, so Shift/Ctrl+arrows, selection, word motions, IME input and paste-at-caret had nothing to act on. Use a TextInput for the field and let Qt own the caret, selection and keyboard editing. omacast's own keys (list navigation, popups, Enter, Ctrl+U) are still handled first. Add core/TextCursor.js for the Ctrl+Backspace / Ctrl+Delete word bounds, make paste insert at the caret and replace the selection, and extend the launcher tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The search field was a plain
Textelement with a hand-drawn fake caret.handleKey()appended characters or sliced them off the end of the string, so the field had no caret model and no selection at all:Fix
ui/LauncherWindow.qmlTextInput, focused whenever the launcher opens. Qt owns the caret, selection, mouse editing and IME:selectByMouse)Keys.onPressedon the input (list navigation, action panel, Enter, popups, Ctrl+U); everything else falls through to Qt.cursorRectangle, same placeholder/font/colors, and the field is clipped while scrolling so a long query no longer paints over the back arrow.TextInputdoesn't implement it consistently).core/TextCursor.js(new) — word bounds and deletion ranges for Ctrl+Backspace / Ctrl+Delete, with unit tests intests/textcursor.test.js.tests/launcher-paste.test.js— harness extended with a TextInput stand-in; new coverage for paste-at-caret/replace-selection and word deletion.CLAUDE.md— status note for the field behaviour.No backend, IPC or contract changes.
Testing
node --test tests/*.test.js: 146 pass, 0 fail, 3 skipped in a fresh clone. The skips are the native-search helper (built by CI viabin/build-search) and the two environment-dependent tests.omarchy plugin validate .passes.