Skip to content

vim-patch:9.1.{1214,1217,1219}: matchfuzzy() "camelcase" #32953

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
merged 3 commits into from
Mar 27, 2025

Conversation

glepnir
Copy link
Member

@glepnir glepnir commented Mar 18, 2025

Problem: When searching for "Cur", CamelCase matches like "lCursor" score
higher than exact prefix matches like Cursor, which is
counter-intuitive (Maxim Kim).
Solution: Add a 'camelcase' option to matchfuzzy() that lets users disable
CamelCase bonuses when needed, making prefix matches rank higher.
(glepnir)

closes: vim/vim#16797

vim/vim@28e40a7

@github-actions github-actions bot added the vim-patch See https://neovim.io/doc/user/dev_vimpatch.html label Mar 18, 2025
@github-actions github-actions bot requested a review from zeertzjq March 18, 2025 08:01
@glepnir glepnir force-pushed the vim-9.1.1214 branch 2 times, most recently from fa962e5 to 1a976bc Compare March 18, 2025 08:28
@przepompownia
Copy link
Contributor

przepompownia commented Mar 19, 2025

The typehint from #32985 (comment) should be placed here rather than directly in #32985.

glepnir and others added 3 commits March 27, 2025 08:19
Problem:  When searching for "Cur", CamelCase matches like "lCursor" score
          higher than exact prefix matches like Cursor, which is
          counter-intuitive (Maxim Kim).
Solution: Add a 'camelcase' option to matchfuzzy() that lets users disable
          CamelCase bonuses when needed, making prefix matches rank higher.
          (glepnir)

fixes: vim/vim#16504
closes: vim/vim#16797

vim/vim@28e40a7

Co-authored-by: glepnir <[email protected]>
Problem:  tests: typos in test_matchfuzzy.vim (after 9.1.1214).
Solution: Fix the typos.  Consistently put the function call on the
          second line in assertions for camelcase (zeertzjq).

closes: vim/vim#16907

vim/vim@8562773
…amelcase"

Problem:  Strange error with type for matchfuzzy() "camelcase".
Solution: Show the error "Invalid value for argument camelcase" instead
          of "Invalid argument: camelcase" (zeertzjq).

Note that using tv_get_string() will lead to confusion, as when the
value cannot be converted to a string tv_get_string() will also give an
error about that, but "camelcase" takes a boolean, not a string.  Also
don't use tv_get_string() for the "limit" argument above.

closes: vim/vim#16926

vim/vim@c4815c1
@zeertzjq zeertzjq changed the title vim-patch:9.1.1214: matchfuzzy() can be improved for camel case matches vim-patch:9.1.{1214,1217,1219}: matchfuzzy() "camelcase" Mar 27, 2025
@zeertzjq zeertzjq merged commit 8f40ffd into neovim:master Mar 27, 2025
30 checks passed
@glepnir glepnir deleted the vim-9.1.1214 branch March 27, 2025 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vim-patch See https://neovim.io/doc/user/dev_vimpatch.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants