project_panel: Fix mixed sort with incorrect ordering when same file and dir name#47863
Merged
smitbarmase merged 1 commit intozed-industries:mainfrom Feb 16, 2026
Merged
Conversation
When using mixed sort mode in the project panel, a folder and file with the same name but different case (e.g., 'hello' folder and 'Hello.txt' file) would sort incorrectly. The file could appear between an expanded folder and its contents. The issue was in compare_rel_paths_mixed: the tie-breaker logic used case-sensitive comparison (a == b) to decide directory-before-file ordering, but natural_sort_no_tiebreak already considers entries equal case-insensitively. Changed to use eq_ignore_ascii_case to match. Fixes zed-industries#47678
5cb4ddb to
1d9a266
Compare
smitbarmase
approved these changes
Feb 16, 2026
Member
smitbarmase
left a comment
There was a problem hiding this comment.
Thanks! Clean fix. Rebased on latest main.
rtfeldman
pushed a commit
that referenced
this pull request
Feb 17, 2026
…and dir name (#47863) Closes #47678 When using mixed sort mode in the project panel, a folder and file with the same name but different case (e.g., `hello` folder and `Hello.txt` file) would sort incorrectly. The file could appear between an expanded folder and its contents. The issue was in `compare_rel_paths_mixed`: the tie-breaker logic used case-sensitive comparison (`a == b`) to decide directory-before-file ordering, but `natural_sort_no_tiebreak` already considers entries equal case-insensitively. Changed to use `eq_ignore_ascii_case` to match. Release Notes: - Fixed project panel mixed sort mode ordering incorrectly when a file and folder share the same name with different casing.
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.
Closes #47678
When using mixed sort mode in the project panel, a folder and file with the same name but different case (e.g.,
hellofolder andHello.txtfile) would sort incorrectly. The file could appear between an expanded folder and its contents.The issue was in
compare_rel_paths_mixed: the tie-breaker logic used case-sensitive comparison (a == b) to decide directory-before-file ordering, butnatural_sort_no_tiebreakalready considers entries equal case-insensitively. Changed to useeq_ignore_ascii_caseto match.Release Notes: