Skip to content
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

[cmdpalette-] make fuzzy match case-insensitive #2658

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

midichef
Copy link
Contributor

@midichef midichef commented Dec 29, 2024

Closes #2645.

A fuzzymatch search for $EDITOR was turned into a pattern of "$editor". Because searches in _fuzzymatch() are case-sensitive, the lowercase pattern did not match "$EDITOR".

This PR lowercases all the strings that are searched, so the lowercase pattern can match them..

Lowercasing the command strings every time is a bit inefficient, since there are 400 of them. Profiling shows it makes a vd.fuzzymatch() search for selecta 5% slower, for an extra delay of about +1.5ms.

lowercase and uppercase patterns were failing to match to uppercase strings.
@anjakefala anjakefala merged commit 8f66127 into saulpw:develop Jan 4, 2025
14 checks passed
@midichef midichef deleted the fuzzymatch_case branch January 4, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

command palette ranks results in unexpected ways
3 participants