]> granicus.if.org Git - vim/commitdiff
patch 8.0.0237: when 'wildoptions' is "tagfile" completion may not work v8.0.0237
authorBram Moolenaar <Bram@vim.org>
Tue, 24 Jan 2017 20:18:19 +0000 (21:18 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 24 Jan 2017 20:18:19 +0000 (21:18 +0100)
Problem:    When setting wildoptions=tagfile the completion context is not set
            correctly. (desjardins)
Solution:   Check for EXPAND_TAGS_LISTFILES. (Christian Brabandt, closes #1399)

src/ex_getln.c
src/testdir/test_cmdline.vim
src/version.c

index 7de7246b55a5a68124a49940f620ed1d005aa55e..4365100a2bbd09adab76b8c6d79bceb6ffbdda90 100644 (file)
@@ -4366,7 +4366,9 @@ addstar(
                || context == EXPAND_OWNSYNTAX
                || context == EXPAND_FILETYPE
                || context == EXPAND_PACKADD
-               || (context == EXPAND_TAGS && fname[0] == '/'))
+               || ((context == EXPAND_TAGS_LISTFILES
+                       || context == EXPAND_TAGS)
+                   && fname[0] == '/'))
            retval = vim_strnsave(fname, len);
        else
        {
index 279a1681c4b600dff20ff3e48311852a162beb6d..fcfce7354d0b0e4d094dbab71280fcda1df59123 100644 (file)
@@ -295,3 +295,14 @@ func Test_illegal_address()
   2;')
   quit
 endfunc
+
+func Test_cmdline_complete_wildoptions()
+  help
+  call feedkeys(":tag /\<c-a>\<c-b>\"\<cr>", 'tx')
+  let a = join(sort(split(@:)),' ')
+  set wildoptions=tagfile
+  call feedkeys(":tag /\<c-a>\<c-b>\"\<cr>", 'tx')
+  let b = join(sort(split(@:)),' ')
+  call assert_equal(a, b)
+  bw!
+endfunc
index 684a244cd98e6586ad30926f6cb4dd26f82a7ab5..68ea529097a8266e586fc95f56f79dfe5de80be3 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    237,
 /**/
     236,
 /**/