-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Symbol picker displays confusing sort order on filter #4688
Comments
Are you using maser or the latest release? #3969 may have fixed this @pascalkuthe |
Tried on latest release and master, the exact match is ranked lower on both. |
fzf solves for this with the --tiebreak flag, which defaults to length (shorter result wins); perhaps that could make sense here as well? |
Thanks for tagging me @kirawi. #3969 does not change the sort order. I kept that PR minimal on purpose (the only thing I did there was treating space the same as fzf/skim). For example for this exact case fzf and skim actually diverge.
Furthermore both skim and fzf allow specifying multiple such tie break options (so if elements are still tied after the first tie breaker the second one applies). I think hardcoding any of these options doesn't make much sense because different pickers might want different sorting orders (and users might even prefer different sorting orders or different sorting orders might even be nice for different languages). I think the current behavior can definitely be improved because we are doing an unstable sort right now (so the order is essentially random if the score is equal). I will open a PR where I implement the basic machinery to make this work (and be configurable in the picker) and then pick defaults for the various pickers. I am not sure what the best way to allow user configuration is. Potentially changing this at runtime might be nice (with some kind of indicator + a keybinding to change the tie breaker) |
fixed by #4698 |
Fuzzy match scoring can definitely be a matter of taste, but in this case I would expect the exact match "TimeEntry" to be ranked higher than all the prefix matches. It's a bit painful to have to scroll down all the way to get to the one I want, as there's no way to narrow the match by typing more characters here.
The text was updated successfully, but these errors were encountered: