With 'ignorecase' set, :gz<Tab> completes to a user command :Gz, but :kz<Tab> does not reach a user command :Kz. This is because set_cmd_index() short-circuits any :k<X> as :k {X} (the mark argument) before command-name expansion runs.
Skip the short-circuit when p_ic is set so the input flows through the normal command-name expansion path. Default behaviour (noignorecase) is unchanged, so Test_cmdline_complete_various and Test_fuzzy_completion_cmd_k still pass.
A regression test is added that covers both noignorecase and ignorecase.
Fixes #20241
https://github.com/vim/vim/pull/20275
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq commented on this pull request.
In src/cmdexpand.c:
> @@ -1759,11 +1759,11 @@ set_cmd_index(char_u *cmd, exarg_T *eap, expand_T *xp, int *complp)
// Isolate the command and search for it in the command table.
// Exceptions:
// - the 'k' command can directly be followed by any character, but do
- // accept "keepmarks", "keepalt" and "keepjumps". As fuzzy matching can
- // find matches anywhere in the command name, do this only for command
- // expansion based on regular expression and not for fuzzy matching.
+ // accept "keepmarks", "keepalt" and "keepjumps". Bypass also when
+ // 'ignorecase' is set so a lowercase ":kz" still completes a user
+ // command like :Kz (#20241), and for fuzzy matching as before.
⬇️ Suggested change
- // command like :Kz (#20241), and for fuzzy matching as before. + // command like :Kz (#20241), and for fuzzy matching as that can find + // matches anywhere in the command name.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@mattn pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq Right, thank you
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
thanks both 🙇♂️
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()