mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +00:00
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
0407d621bb
Co-authored-by: Ruslan Russkikh <dvrussk@yandex.ru>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user