Skip to content

Delete the previous word with Ctrl+W in the shell's filter fields - #9514

Open
BrouZie wants to merge 1 commit into
omacom:quattrofrom
BrouZie:ctrl-w-werase
Open

Delete the previous word with Ctrl+W in the shell's filter fields#9514
BrouZie wants to merge 1 commit into
omacom:quattrofrom
BrouZie:ctrl-w-werase

Conversation

@BrouZie

@BrouZie BrouZie commented Sep 1, 2026

Copy link
Copy Markdown

The filter field already takes Ctrl+U to clear itself - that is the terminal's
kill-line. Ctrl+W is its sibling on the other half of that pair (werase, or
unix-word-rubout in readline), and today it does nothing. This adds it, doing
the same word delete Ctrl+Backspace already does.

Five lines in shell/Commons/Util.qml: both conditions it needs already existed
and only needed widening, so there is no new code path and still one copy of the
word-delete expression. The two helpers are shared, so it lands in the menu,
clipboard, emojis, image picker and reminders at once, with no changes at the
call sites.

Ctrl+W on an empty filter stays inert, so the menu's Backspace/Left
back-navigation is untouched. Ctrl+Shift+W stays inert too, matching the way
Ctrl+U is matched today.

./test/all: 1 of 221 test files failed (bar-icon-geometry-test.sh). The same
failure happens on a clean origin/quattro and on the feature-branch. Referenced
is a video of a live test:

ctrl-w.mp4

Ctrl+W is the terminal's werase and readline's unix-word-rubout, but it
did nothing in the searchable panels: with Ctrl held Qt sends 0x17, which
their printable-character catch-all drops. Fold it into the branches that
already handle Ctrl+U and Ctrl+Backspace, so all five filter surfaces pick
it up through the shared helper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant