mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
@@ -9648,13 +9648,23 @@ static void f_getcompletion(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
{
|
||||
char_u *pat;
|
||||
expand_T xpc;
|
||||
bool filtered = false;
|
||||
int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
|
||||
| WILD_NO_BEEP;
|
||||
|
||||
if (argvars[2].v_type != VAR_UNKNOWN) {
|
||||
filtered = get_tv_number_chk(&argvars[2], NULL);
|
||||
}
|
||||
|
||||
if (p_wic) {
|
||||
options |= WILD_ICASE;
|
||||
}
|
||||
|
||||
// For filtered results, 'wildignore' is used
|
||||
if (!filtered) {
|
||||
options |= WILD_KEEP_ALL;
|
||||
}
|
||||
|
||||
ExpandInit(&xpc);
|
||||
xpc.xp_pattern = get_tv_string(&argvars[0]);
|
||||
xpc.xp_pattern_len = STRLEN(xpc.xp_pattern);
|
||||
@@ -9673,6 +9683,16 @@ static void f_getcompletion(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
xpc.xp_pattern_len = STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
|
||||
if (xpc.xp_context == EXPAND_CSCOPE) {
|
||||
set_context_in_cscope_cmd(&xpc, xpc.xp_pattern, CMD_cscope);
|
||||
xpc.xp_pattern_len = STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
|
||||
if (xpc.xp_context == EXPAND_SIGN) {
|
||||
set_context_in_sign_cmd(&xpc, xpc.xp_pattern);
|
||||
xpc.xp_pattern_len = STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
|
||||
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
|
||||
rettv_list_alloc(rettv);
|
||||
if (pat != NULL) {
|
||||
|
Reference in New Issue
Block a user