diff src/evalfunc.c @ 9766:be9b5f8c3fd9 v7.4.2158

commit https://github.com/vim/vim/commit/b650b9878e9f0ac6bb1b61230095ad9ab3850a33 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 5 20:35:13 2016 +0200 patch 7.4.2158 Problem: Result of getcompletion('', 'cscope') depends on previous completion. (Christian Brabandt) Solution: Call set_context_in_cscope_cmd().
author Christian Brabandt <cb@256bit.org>
date Fri, 05 Aug 2016 20:45:06 +0200
parents a990e7ed260b
children ba98d7ce0d74
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -4240,6 +4240,13 @@ f_getcompletion(typval_T *argvars, typva
 	xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
     }
 # endif
+#ifdef FEAT_CSCOPE
+    if (xpc.xp_context == EXPAND_CSCOPE)
+    {
+	set_context_in_cscope_cmd(&xpc, xpc.xp_pattern, CMD_cscope);
+	xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
+    }
+#endif
 
     pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
     if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL))