-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
git_ui: Fix select next/previous entry selects non-visible entry when tree view is enabled #45030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cole-miller
merged 2 commits into
zed-industries:main
from
RemcoSmitsDev:git-ui-keyboard-navigation-follow-up
Dec 16, 2025
Merged
git_ui: Fix select next/previous entry selects non-visible entry when tree view is enabled #45030
cole-miller
merged 2 commits into
zed-industries:main
from
RemcoSmitsDev:git-ui-keyboard-navigation-follow-up
Dec 16, 2025
Conversation
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
Before this commit we would select a non-visible entry when a directory is collapsed. No we correctly select the visible entry that is visually the previous/next entry. Follow-up: zed-industries#45002
Member
|
Thanks Remco, this looks great! Happy to merge but I noticed while testing that we also have a bug with the selection disappearing when we go up past the first (visual) entry, in case you want to fix that as well :) |
Contributor
Author
|
Hey Cole, thanks for your review. Nice catch, fixed it: Screen.Recording.2025-12-16.at.22.41.35.mov |
Member
|
Thanks! |
RemcoSmitsDev
added a commit
to RemcoSmitsDev/zed
that referenced
this pull request
Dec 17, 2025
mode is enabled. Before this commit we would select a entry that is visually not the first, but logical wise it is. This happends if the first entry is a directory with files that are collapsed. We would select entry n of entries in the directory that is collapsed after it. Follow-up: zed-industries#45030
cole-miller
pushed a commit
that referenced
this pull request
Dec 17, 2025
…hen tree view is enabled (#45108) This PR fixes a bug where the select first didn't select the first visual entry when the first entry is a collapsed directory. Follow-up: #45030 **Before**: https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41 **After**: https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998 Release Notes: - git_ui: Fix select first entry selects the wrong visual first entry when tree view is enabled
HactarCE
pushed a commit
that referenced
this pull request
Dec 17, 2025
… tree view is enabled (#45030) Before this commit, we would select a non-visible entry when a directory is collapsed. Now we correctly select the visible entry that is visually the previous/next entry in the list. **Note**: I removed the `cx.notify()` call as it's already part of the `self.scroll_to_selected_entry(cx)` call. So we don't notify twice :). Follow-up: #45002 **Before** https://github.com/user-attachments/assets/da0b8084-0081-4d98-ad8a-c11c3b95a1b7 **After** https://github.com/user-attachments/assets/8a16afb0-fdde-4317-b419-13143d5d608e Release Notes: - git_ui: Fix select next/previous entry selects non-visible entry when tree view is enabled
HactarCE
pushed a commit
that referenced
this pull request
Dec 17, 2025
…hen tree view is enabled (#45108) This PR fixes a bug where the select first didn't select the first visual entry when the first entry is a collapsed directory. Follow-up: #45030 **Before**: https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41 **After**: https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998 Release Notes: - git_ui: Fix select first entry selects the wrong visual first entry when tree view is enabled
rtfeldman
pushed a commit
that referenced
this pull request
Jan 5, 2026
…hen tree view is enabled (#45108) This PR fixes a bug where the select first didn't select the first visual entry when the first entry is a collapsed directory. Follow-up: #45030 **Before**: https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41 **After**: https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998 Release Notes: - git_ui: Fix select first entry selects the wrong visual first entry when tree view is enabled
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
… tree view is enabled (zed-industries#45030) Before this commit, we would select a non-visible entry when a directory is collapsed. Now we correctly select the visible entry that is visually the previous/next entry in the list. **Note**: I removed the `cx.notify()` call as it's already part of the `self.scroll_to_selected_entry(cx)` call. So we don't notify twice :). Follow-up: zed-industries#45002 **Before** https://github.com/user-attachments/assets/da0b8084-0081-4d98-ad8a-c11c3b95a1b7 **After** https://github.com/user-attachments/assets/8a16afb0-fdde-4317-b419-13143d5d608e Release Notes: - git_ui: Fix select next/previous entry selects non-visible entry when tree view is enabled
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…hen tree view is enabled (zed-industries#45108) This PR fixes a bug where the select first didn't select the first visual entry when the first entry is a collapsed directory. Follow-up: zed-industries#45030 **Before**: https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41 **After**: https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998 Release Notes: - git_ui: Fix select first entry selects the wrong visual first entry when tree view is enabled
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
… tree view is enabled (zed-industries#45030) Before this commit, we would select a non-visible entry when a directory is collapsed. Now we correctly select the visible entry that is visually the previous/next entry in the list. **Note**: I removed the `cx.notify()` call as it's already part of the `self.scroll_to_selected_entry(cx)` call. So we don't notify twice :). Follow-up: zed-industries#45002 **Before** https://github.com/user-attachments/assets/da0b8084-0081-4d98-ad8a-c11c3b95a1b7 **After** https://github.com/user-attachments/assets/8a16afb0-fdde-4317-b419-13143d5d608e Release Notes: - git_ui: Fix select next/previous entry selects non-visible entry when tree view is enabled
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
…hen tree view is enabled (zed-industries#45108) This PR fixes a bug where the select first didn't select the first visual entry when the first entry is a collapsed directory. Follow-up: zed-industries#45030 **Before**: https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41 **After**: https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998 Release Notes: - git_ui: Fix select first entry selects the wrong visual first entry when tree view is enabled
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla-signed
The user has signed the Contributor License Agreement
community champion
Issues filed by our amazing community champions! 🫶
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.
Before this commit, we would select a non-visible entry when a directory is collapsed. Now we correctly select the visible entry that is visually the previous/next entry in the list.
Note: I removed the
cx.notify()call as it's already part of theself.scroll_to_selected_entry(cx)call. So we don't notify twice :).Follow-up: #45002
Before
Screen.Recording.2025-12-16.at.21.33.26.mov
After
Screen.Recording.2025-12-16.at.21.19.55.mov
Release Notes: