0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

patch 8.0.0237: when 'wildoptions' is "tagfile" completion may not work

Problem:    When setting wildoptions=tagfile the completion context is not set
            correctly. (desjardins)
Solution:   Check for EXPAND_TAGS_LISTFILES. (Christian Brabandt, closes #1399)
This commit is contained in:
Bram Moolenaar 2017-01-24 21:18:19 +01:00
parent 6a717f17ec
commit ba47b51ff8
3 changed files with 16 additions and 1 deletions

View File

@ -4366,7 +4366,9 @@ addstar(
|| context == EXPAND_OWNSYNTAX || context == EXPAND_OWNSYNTAX
|| context == EXPAND_FILETYPE || context == EXPAND_FILETYPE
|| context == EXPAND_PACKADD || context == EXPAND_PACKADD
|| (context == EXPAND_TAGS && fname[0] == '/')) || ((context == EXPAND_TAGS_LISTFILES
|| context == EXPAND_TAGS)
&& fname[0] == '/'))
retval = vim_strnsave(fname, len); retval = vim_strnsave(fname, len);
else else
{ {

View File

@ -295,3 +295,14 @@ func Test_illegal_address()
2;') 2;')
quit quit
endfunc 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

View File

@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
237,
/**/ /**/
236, 236,
/**/ /**/