Skip to content

Add C-k (kill to end of line) to the C-x b search box#694

Merged
edwin-zvs merged 1 commit into
mainfrom
session-picker-ctrl-k
Jul 2, 2026
Merged

Add C-k (kill to end of line) to the C-x b search box#694
edwin-zvs merged 1 commit into
mainfrom
session-picker-ctrl-k

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to Add Emacs cursor motion to the C-x b search box #692 (Emacs cursor motion in the C-x b search box), which added C-f/C-b/C-a/C-e and a cursor: usize field on SessionPickerDialog.
  • Adds C-k: kill from the cursor to the end of the query (Emacs kill-line semantics), truncating query at the cursor byte position. The cursor itself doesn't move — it's now at the (shorter) end.
  • Wired in only for the C-x b switcher's own search line, matching the existing !to_program guard used by the other Emacs motions (the @→session variant's "query" is the program buffer's live token with its own cursor semantics).

Test plan

  • cargo test -p agentd-cli session_picker — added session_picker_ctrl_k_kills_to_end_of_line, all 25 session-picker tests pass.
  • cargo build — builds clean (pre-existing unrelated warnings only).

Follows up on #692's Emacs cursor motion — C-k truncates the query at
the cursor, mirroring readline/Emacs kill-line semantics.
@edwin-zvs
edwin-zvs merged commit ee73f41 into main Jul 2, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the session-picker-ctrl-k branch July 2, 2026 23:41
@edwin-zvs edwin-zvs mentioned this pull request Jul 2, 2026
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