We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c4d4a commit b650b98Copy full SHA for b650b98
3 files changed
src/evalfunc.c
@@ -4240,6 +4240,13 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
4240
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
4241
}
4242
# endif
4243
+#ifdef FEAT_CSCOPE
4244
+ if (xpc.xp_context == EXPAND_CSCOPE)
4245
+ {
4246
+ set_context_in_cscope_cmd(&xpc, xpc.xp_pattern, CMD_cscope);
4247
+ xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
4248
+ }
4249
+#endif
4250
4251
pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
4252
if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL))
src/testdir/test_cmdline.vim
@@ -125,12 +125,22 @@ func Test_getcompletion()
125
let l = getcompletion('dark', 'highlight')
126
call assert_equal([], l)
127
128
+ if has('cscope')
129
+ let l = getcompletion('', 'cscope')
130
+ let cmds = ['add', 'find', 'help', 'kill', 'reset', 'show']
131
+ call assert_equal(cmds, l)
132
+ " using cmdline completion must not change the result
133
+ call feedkeys(":cscope find \<c-d>\<c-c>", 'xt')
134
135
136
+ let keys = ['a', 'c', 'd', 'e', 'f', 'g', 'i', 's', 't']
137
+ let l = getcompletion('find ', 'cscope')
138
+ call assert_equal(keys, l)
139
+ endif
140
+
141
" For others test if the name is recognized.
142
let names = ['buffer', 'environment', 'file_in_path',
143
\ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user']
- if has('cscope')
- call add(names, 'cscope')
- endif
144
if has('cmdline_hist')
145
call add(names, 'history')
146
endif
src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
763
764
static int included_patches[] =
765
{ /* Add new patch number below this line */
766
+/**/
767
+ 2158,
768
/**/
769
2157,
770
0 commit comments