Repository navigation
Conversation
…mode Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Edit from the diff of a file (full, collapsed or patch rows, inline or split) opened the editor at the top. The diff's rows now hand over the first file line at the top of the list, and take it back on leaving. Also fixes cases the first hand-over missed: a caret left out of view when one wrapped line fills the view or the view is panned sideways, a place inside lines a save adds, Cancel, a failed read, rendered diagrams, snapped row heights at fractional zoom, a preview shorter than the buffer, late wrap estimates, and a kept reload offset leaking into another repository. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A place waiting for a diff or preview that never got its rows could be taken by the other view of the same file, or fire much later on rows of another diff. It now goes when its surface leaves the screen or settles with nothing to show. A hosted view row above a line no longer counts as pixels into that line, and TextInput has one reveal entry point. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Clicking Edit on a file scrolled down in the read-only preview, or in its diff, opened the editor at the top. The read-only views and the editor are separate widgets with their own scroll handles, and nothing passed the position between them.
The top visible file line (and how much of it is scrolled away, plus the sideways offset) is now handed to the other view of the same file when the mode flips, in both directions:
The place is a line, not a pixel offset, because the views wrap at different widths and a diff has rows the file does not.
Not changed: Edit from a rendered markdown, SVG or diagram view still opens at the top. For a staged or commit diff the new side is not the working-tree file, so the line carried over is approximate.
Validation
cargo fmt --checkandcargo clippy --locked -p gitcomet-ui-kit -p gitcomet-ui-gpui --tests -- -D warningspass on the final commit.cargo test -p gitcomet-ui-kit: 616 passed on the final commit.cargo test -p gitcomet-ui-gpui --lib: 4457 passed on the second commit. Not run on the final commit: the local build of that test binary died with a rustc SIGSEGV 23 times in a row (a machine fault, kernel general-protection faults in libLLVM). CI is the first full run of it.panels/tests/file_edit_scroll.rsand 10 in the text input'stests/scrolling.rs. Each was run with its fix removed and failed, except two that do not isolate their fix (an_editor_that_failed_to_read_hands_the_place_back,a_place_inside_a_wrapped_line_stays_in_that_line).🤖 Generated with Claude Code