Fix Ctrl-A in multiline terminal prompts#10362
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @sdaveas on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I reviewed this pull request and requested human review from: Comment Powered by Oz |
Use terminal-specific line-start behavior so Ctrl-A first moves to the current prompt line start, then steps to the previous line when already at column zero. Co-Authored-By: Warp <agent@warp.dev>
There was a problem hiding this comment.
Overview
This PR adds a configurable editor line-start behavior and opts terminal input into moving to the previous prompt line when MoveToLineStart is invoked from column 0. The default behavior remains unchanged for other editor surfaces, and the added tests cover the editor option and terminal input path.
Concerns
- No blocking correctness or security concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
9253ed2 to
ab46317
Compare
|
@vkodithala Could you take over? This is an edit to terminal/input.rs |
vkodithala
left a comment
There was a problem hiding this comment.
Hey @sdaveas - thanks for the fix, this looks awesome. Mind linking an issue on our public repo? If there isn't already one, feel free to file manually or via the /feedback slash command in Warp :)
@vkodithala done! Created an issue and linked in the description. |
|
Thanks so much! We just reviewed this and are looking for a little more info. For context, the decision to make |
vkodithala
left a comment
There was a problem hiding this comment.
Feel free to re-request a review if and when the original issue is marked ready-to-spec/implement!
Description
Fixes terminal input
Ctrl-Abehavior for multiline prompts. Terminal input now opts into a line-start behavior whereCtrl-Afirst moves to the start of the current prompt line, and pressing it again from column 0 moves to the start of the previous prompt line. Other editor surfaces keep the existing current-line behavior.This intentionally leaves
Ctrl-Eunchanged for now, with a TODO to revisit terminal-style line-end behavior separately.Linked Issue
#10763
ready-to-specorready-to-implement.Screenshots / Videos
Testing
cargo fmt --checkcargo test -p warp test_move_to_line_start_previous_line_when_at_startcargo test -p warp test_terminal_input_line_start_moves_to_previous_line_when_at_startcargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warningscargo clippy -p warp_completer --all-targets --tests -- -D warningsValidation was run on the remote laptop because the local laptop cannot build Warp without the full Xcode Metal toolchain.
Agent Mode
CHANGELOG-BUG-FIX: Fixed Ctrl-A behavior in multiline terminal prompts to move by prompt line.
Co-Authored-By: Warp agent@warp.dev