diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-17 16:28:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 16:28:15 +0800 |
commit | 8abf53be6e2aa92a60220a11c2a5ad6d9b364235 (patch) | |
tree | ef37b9f58313e74369aca271eb87b849ce6b4a7e /src/nvim/cmdexpand.c | |
parent | fc692dfce1dada0b40356bfcdfc55ee783f9ee2d (diff) | |
download | rneovim-8abf53be6e2aa92a60220a11c2a5ad6d9b364235.tar.gz rneovim-8abf53be6e2aa92a60220a11c2a5ad6d9b364235.tar.bz2 rneovim-8abf53be6e2aa92a60220a11c2a5ad6d9b364235.zip |
vim-patch:9.0.0089: fuzzy argument completion doesn't work for shell commands (#21852)
Problem: Fuzzy argument completion doesn't work for shell commands.
Solution: Check for cmdidx not being CMD_bang. (Yegappan Lakshmanan,
closes vim/vim#10769)
https://github.com/vim/vim/commit/7db3a8e3298bf7c7c3f74cc9c1add04f29e78d2d
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r-- | src/nvim/cmdexpand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c index 779605c29a..ef64bf90fa 100644 --- a/src/nvim/cmdexpand.c +++ b/src/nvim/cmdexpand.c @@ -1418,8 +1418,10 @@ static const char *set_cmd_index(const char *cmd, exarg_T *eap, expand_T *xp, in eap->cmdidx = excmd_get_cmdidx(cmd, len); // User defined commands support alphanumeric characters. - // Also when doing fuzzy expansion, support alphanumeric characters. - if ((cmd[0] >= 'A' && cmd[0] <= 'Z') || (fuzzy && *p != NUL)) { + // Also when doing fuzzy expansion for non-shell commands, support + // alphanumeric characters. + if ((cmd[0] >= 'A' && cmd[0] <= 'Z') + || (fuzzy && eap->cmdidx != CMD_bang && *p != NUL)) { while (ASCII_ISALNUM(*p) || *p == '*') { // Allow * wild card p++; } |