Patch 7.4.2158
Problem:    Result of getcompletion('', 'cscope') depends on previous
            completion. (Christian Brabandt)
Solution:   Call set_context_in_cscope_cmd().
Files:      src/evalfunc.c, src/testdir/test_cmdline.vim


*** ../vim-7.4.2157/src/evalfunc.c      2016-08-03 22:08:41.739652181 +0200
--- src/evalfunc.c      2016-08-05 20:24:29.727392286 +0200
***************
*** 4240,4245 ****
--- 4240,4252 ----
        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))
*** ../vim-7.4.2157/src/testdir/test_cmdline.vim        2016-07-28 
22:53:33.161059376 +0200
--- src/testdir/test_cmdline.vim        2016-08-05 20:24:07.135572140 +0200
***************
*** 125,136 ****
    let l = getcompletion('dark', 'highlight')
    call assert_equal([], l)
  
    " For others test if the name is recognized.
    let names = ['buffer', 'environment', 'file_in_path',
        \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user']
-   if has('cscope')
-     call add(names, 'cscope')
-   endif
    if has('cmdline_hist')
      call add(names, 'history')
    endif
--- 125,146 ----
    let l = getcompletion('dark', 'highlight')
    call assert_equal([], l)
  
+   if has('cscope')
+     let l = getcompletion('', 'cscope')
+     let cmds = ['add', 'find', 'help', 'kill', 'reset', 'show']
+     call assert_equal(cmds, l)
+     " using cmdline completion must not change the result
+     call feedkeys(":cscope find \<c-d>\<c-c>", 'xt')
+     let l = getcompletion('', 'cscope')
+     call assert_equal(cmds, l)
+     let keys = ['a', 'c', 'd', 'e', 'f', 'g', 'i', 's', 't']
+     let l = getcompletion('find ', 'cscope')
+     call assert_equal(keys, l)
+   endif
+ 
    " For others test if the name is recognized.
    let names = ['buffer', 'environment', 'file_in_path',
        \ 'mapping', 'shellcmd', 'tag', 'tag_listfiles', 'user']
    if has('cmdline_hist')
      call add(names, 'history')
    endif
*** ../vim-7.4.2157/src/version.c       2016-08-05 19:31:37.648426119 +0200
--- src/version.c       2016-08-05 20:27:07.570136207 +0200
***************
*** 765,766 ****
--- 765,768 ----
  {   /* Add new patch number below this line */
+ /**/
+     2158,
  /**/

-- 
DENNIS: Oh, very nice. King, eh!  I expect you've got a palace and fine
        clothes and courtiers and plenty of food.  And how d'you get that?  By
        exploiting the workers! By hanging on to outdated imperialist dogma
        which perpetuates the social and economic differences in our society!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui