git_ui: Fix indent guide rendering in tree view with collapsed folders#48194
Merged
git_ui: Fix indent guide rendering in tree view with collapsed folders#48194
Conversation
The indent guide computation was using visible list indices directly to access entries, instead of mapping through `logical_indices` first. This caused incorrect depths to be read from hidden entries when a folder was collapsed, resulting in stray vertical lines extending to unrelated folders.
adb-sh
pushed a commit
to adb-sh/zed
that referenced
this pull request
Feb 5, 2026
zed-industries#48194) The indent guide computation was using visible list indices directly to access entries, instead of mapping through `logical_indices` first. This caused incorrect depths to be read from hidden entries when a folder was collapsed, resulting in stray vertical lines extending to unrelated folders. Closes zed-industries#48189 Release Notes: - Fixed a visual bug in the Git Panel where collapsing a folder in tree view would cause indent guide lines to incorrectly extend to unrelated folders below it.
naaiyy
added a commit
to Glass-HQ/Glass
that referenced
this pull request
Feb 16, 2026
Key changes: - Reduce monomorphizations in GPUI app.rs (zed-industries#48014) - Entities no longer implement Element directly, go through AnyElement (zed-industries#48217) - D3D11 resource upload optimization (zed-industries#48282) - Migrate features.edit_prediction_provider to edit_predictions.provider (zed-industries#48224) - Make mercury and sweep non-experimental (zed-industries#48227) - CompanionView consolidation in block_map (zed-industries#48223) - Show memory used by language servers (zed-industries#48226) - Settings links open sub pages (zed-industries#48212) - Tool security rules that can't be overridden (zed-industries#48209) - Add sweep_ai privacy mode setting (zed-industries#48220) - Configurable REPL output size limits (zed-industries#47114) - Fix .editorconfig files in subdirectories (zed-industries#48203) - Security updates: bytes v1.11.1, jsonwebtoken v10 - Git UI: hide "View on GitHub" for stashes (zed-industries#48271) - Indent guide fix in tree view with collapsed folders (zed-industries#48194) - Edit prediction fixes and improvements Conflict resolution: - collab/completion.rs, collab/rpc.rs: deleted (collab removed) - vim/search.rs: deleted (vim removed) - livekit_api/Cargo.toml: deleted (livekit removed) - GPUI files: deleted from Glass (handled in Obsydian-HQ/gpui) - migrations: combined both ours (m_2026_02_06) and upstream (m_2026_02_02, m_2026_02_03) - project.rs: kept collab functions removed, restored handle_create_file_for_peer for remote dev - lsp_store.rs: removed collab-only set_language_server_statuses_from_proto - proto.rs: kept CreateFileForPeer, removed CreateChannel/CreateChannelResponse - remote_servers.rs: merged import lists (kept native button imports + added Action) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
When viewing changes in tree view mode in the Git Panel, collapsing a folder would cause incorrect vertical indent guide lines to appear. Specifically, if there were changes in two separate folders and the first folder was collapsed, a vertical line would incorrectly continue from the collapsed folder down to the second folder.
The
with_compute_indents_fncallback was using the visible list indices directly to accessself.entries, but in tree view mode, theuniform_listuseslogical_indicesto map visible positions to actual entry indices. When a folder is collapsed, its children remain inself.entriesbut are excluded fromlogical_indices.These changes now map visible indices through
logical_indicesbefore accessingself.entries, ensuring that only visible entries are considered when determining indentation depth.Closes #48189
Release Notes: