feat: Home/End jump to line start/end in multiline composer#1749
Closed
aboimpinto wants to merge 2 commits into
Closed
feat: Home/End jump to line start/end in multiline composer#1749aboimpinto wants to merge 2 commits into
aboimpinto wants to merge 2 commits into
Conversation
Plain Home and End now navigate within the current line instead of jumping to the absolute start/end of the entire input. Ctrl+A and Ctrl+E remain as absolute start/end shortcuts. - Add move_cursor_line_start() / move_cursor_line_end() to App - Wire Home -> move_cursor_line_start(), End -> move_cursor_line_end() - On single-line input the new methods behave identically to the absolute versions (no behaviour change) - End on a newline character skips to the end of the next line - 14 tests covering multiline, singleline, and edge cases
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces move_cursor_line_start and move_cursor_line_end methods to the TUI application to support line-based navigation in multiline inputs, updating the Home and End key bindings accordingly. Feedback focuses on the move_cursor_line_end implementation, which currently skips to the next line if the cursor is already on a newline character. The reviewer recommends removing this non-standard behavior to ensure the End key is idempotent on the current line, and suggests updating the associated test cases to align with this change.
Per gemini-code-assist review on Hmbown#1749: End on a newline character should stay at the end of the current line (idempotent), not skip to the next line. Removes the non-standard skip-past-newline logic and updates the associated tests.
Contributor
Author
|
All three recommendations addressed in 80baf0b:
Thanks for the review. |
11 tasks
Owner
getong
pushed a commit
to getong/CodeWhale
that referenced
this pull request
May 21, 2026
Per gemini-code-assist review on Hmbown#1749: End on a newline character should stay at the end of the current line (idempotent), not skip to the next line. Removes the non-standard skip-past-newline logic and updates the associated 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.
Closes #1748
Plain Home and End now navigate within the current line instead of
jumping to the absolute start/end of the entire input. Ctrl+A and
Ctrl+E remain as absolute start/end shortcuts.
move_cursor_line_start()-- scans backward for \n, positions after itmove_cursor_line_end()-- scans forward for \n, positions before it;if cursor sits on \n, skips to the next line's end