fix(tui): correct delete keybind behavior
Summary
- fix option-delete to avoid removing a newline when deleting a single-word line
- make cmd+backspace consistently delete to line start or join lines at boundaries
- add default super+backspace binding for delete-to-line-start
Testing
- bun dev (manual repro in TUI prompt)
Demo
- uploading video
Fixes #6314, adds #436
Thanks for your contribution!
This PR doesn't have a linked issue. All PRs must reference an existing issue.
Please:
- Open an issue describing the bug/feature (if one doesn't exist)
- Add
Fixes #<number>orCloses #<number>to this PR description
See CONTRIBUTING.md for details.
The following comment was made by an LLM, it may be inaccurate:
No duplicate PRs found
https://github.com/user-attachments/assets/0b5ac413-2550-4983-b19e-c91fe278da9a
Is the behavior of input_delete_to_line_start in deleting newline characters when the input is not at the beginning of a line intentional?
Yes intentional, cmd+backspace only deletes the newline when the cursor is already at line start; mid-line it deletes back to line start and preserves the newline.