Repository navigation
Conversation
Contributor
|
That's why I make a similar pull request to have an artifact to test on my side |
Reading the list in again after a checkout puts the scroll back at the top and drops the selection with it, and putting that selection back left the commit the list had just moved to below the fold, so changing branch looked like nothing had happened at all. * Bring a restored selection into view, the way the re-selection it replaced used to * Leave the list where it stands when the selection was never dropped, so an update on its own still cannot move it under the user
goneng
force-pushed
the
fix-list-not-scrolling-to-the-branch-tip
branch
from
September 12, 2026 08:42
327156e to
d19449f
Compare
goneng
marked this pull request as ready for review
September 12, 2026 08:49
Collaborator
Author
|
Closing in favour of #614, which is the same change on upstream where the CI job can produce an artifact to test. |
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.
Fixes #606.
Changing branch does move the history list to the new branch's tip, but
the rebuild that follows the checkout puts the scroll back at the top and
drops the selection along with it. Restoring that selection put it back
where it stood without bringing it into view, so on any repository whose
branch tips are more than a screen apart the list looked untouched.
Traced on a 60-commit repository, switching to a branch whose tip is row
56 of the list:
This comes from #579, not from #582: before it, the
rebuild's dropped selection was re-made by
-selectCommit:, whichscrolled as it went.
-gitDirForURL:is only read when a document isopened, and the string it builds is the same one as before - the old code
ran
stringWithUTF8String:over the buffer, which stops at the same NULthat
sizecounts up to.Test plan
PBGitHistorySelectionTestsgains 2 tests, of whichtestARestoredSelectionIsBroughtBackIntoViewfails on mastermake unit-test: 51 tests, 0 failuresleave row 1 at the top of the view; it now scrolls so the selected row
56 sits inside the viewport