mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +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:
@@ -91,6 +91,7 @@ static const char *command_complete[] = {
|
||||
[EXPAND_PACKADD] = "packadd",
|
||||
[EXPAND_RUNTIME] = "runtime",
|
||||
[EXPAND_SHELLCMD] = "shellcmd",
|
||||
[EXPAND_SHELLCMDLINE] = "shellcmdline",
|
||||
[EXPAND_SIGN] = "sign",
|
||||
[EXPAND_TAGS] = "tag",
|
||||
[EXPAND_TAGS_LISTFILES] = "tag_listfiles",
|
||||
@@ -285,8 +286,7 @@ const char *set_context_in_user_cmdarg(const char *cmd FUNC_ATTR_UNUSED, const c
|
||||
}
|
||||
|
||||
if (argt & EX_XFILE) {
|
||||
// EX_XFILE: file names are handled above.
|
||||
xp->xp_context = context;
|
||||
// EX_XFILE: file names are handled before this call.
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -675,7 +675,8 @@ int parse_compl_arg(const char *value, int vallen, int *complp, uint32_t *argt,
|
||||
*complp = i;
|
||||
if (i == EXPAND_BUFFERS) {
|
||||
*argt |= EX_BUFNAME;
|
||||
} else if (i == EXPAND_DIRECTORIES || i == EXPAND_FILES) {
|
||||
} else if (i == EXPAND_DIRECTORIES || i == EXPAND_FILES
|
||||
|| i == EXPAND_SHELLCMDLINE) {
|
||||
*argt |= EX_XFILE;
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user