diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-09 08:14:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-09 08:14:18 +0800 |
commit | f449a38f6a47bee30f0d4e291d8234d1ac8288a7 (patch) | |
tree | e65db9b696571e64352b16f849b8cc7582183f8c /src/nvim/cmdexpand.c | |
parent | e98b1b0235a5e817c00814549606631703ab2041 (diff) | |
download | rneovim-f449a38f6a47bee30f0d4e291d8234d1ac8288a7.tar.gz rneovim-f449a38f6a47bee30f0d4e291d8234d1ac8288a7.tar.bz2 rneovim-f449a38f6a47bee30f0d4e291d8234d1ac8288a7.zip |
vim-patch:9.1.0770: current command line completion is a bit limited (#30728)
Problem: current command completion is a bit limited
Solution: Add the shellcmdline completion type and getmdcomplpat()
function (Ruslan Russkikh).
closes: vim/vim#15823
https://github.com/vim/vim/commit/0407d621bbad020b840ffbbbd25ba023bbc05edd
Co-authored-by: Ruslan Russkikh <dvrussk@yandex.ru>
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r-- | src/nvim/cmdexpand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c index 402a891099..b37a1d690f 100644 --- a/src/nvim/cmdexpand.c +++ b/src/nvim/cmdexpand.c @@ -119,6 +119,7 @@ static bool cmdline_fuzzy_completion_supported(const expand_T *const xp) && xp->xp_context != EXPAND_PACKADD && xp->xp_context != EXPAND_RUNTIME && xp->xp_context != EXPAND_SHELLCMD + && xp->xp_context != EXPAND_SHELLCMDLINE && xp->xp_context != EXPAND_TAGS && xp->xp_context != EXPAND_TAGS_LISTFILES && xp->xp_context != EXPAND_USER_LIST @@ -1527,7 +1528,8 @@ static void set_context_for_wildcard_arg(exarg_T *eap, const char *arg, bool use xp->xp_context = EXPAND_FILES; // For a shell command more chars need to be escaped. - if (usefilter || eap->cmdidx == CMD_bang || eap->cmdidx == CMD_terminal) { + if (usefilter || eap->cmdidx == CMD_bang || eap->cmdidx == CMD_terminal + || *complp == EXPAND_SHELLCMDLINE) { #ifndef BACKSLASH_IN_FILENAME xp->xp_shell = true; #endif |