Repository navigation
feat(ui): page through tall hunks and add optional annotation stops - #407
Merged
Merged
Conversation
] on a hunk taller than the viewport jumped to the next hunk after showing its first page, so the rest of it never reached the screen. ] and [ now scroll through such a hunk a page at a time, keeping two rows of overlap, before moving on, and [ onto an earlier tall hunk starts at its last page, so stepping either way shows every row. --stop-at-annotations (off by default) adds file-level and context-line annotations to the same walk, in file order with the hunk starts. --cross-file-hunks still controls crossing into other files. Fixed #405
paging had no height check, so a short hunk left partly off screen by j, a search jump or a click made ] scroll a couple of rows instead of moving to the next hunk, and [ from an 18-line hunk centered by ] scrolled one row instead of going to the previous stop. Paging now needs the hunk to be at least as tall as the viewport, the same test [ uses when it moves onto an earlier hunk; ] already shows any shorter hunk whole when it moves onto it. buildHunkLayout derives line heights from the offsets instead of computing each one twice. A new test pins that a page step which keeps the cursor on the same line does not cross files, and the backlog item about the delete-only guard points at its current locations. Related to #405
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.
Implements the scope agreed in #405:
]and[now page through hunks at least as tall as the viewport before moving on.]scrolls through the rest of it a page at a time, keeping two rows of overlap, before moving to the next hunk.[mirrors it: onto an earlier tall hunk it starts at the last page and pages up to the start. Shorter hunks keep today's jump, since]already shows them whole when it moves onto them. On by default.--stop-at-annotations(REVDIFF_STOP_AT_ANNOTATIONS,stop-at-annotationsin the config, off by default).]and[also stop at the file-level annotation and at annotations on context lines, in file order with the hunk starts. Crossing files is still up to--cross-file-hunks, which stays a bool.}/{and the hunk counter are unchanged.Tests cover visual-row coverage in both directions, wrapped annotations, collapsed mode, short-hunk jumps and cross-file boundaries. README,
site/docs.html, the plugin references and the SKILL.md files document the flag.Fixed #405