vim-patch:8.0.0237 (#7531)

Problem:    When setting wildoptions=tagfile the completion context is not set
            correctly. (desjardins)
Solution:   Check for EXPAND_TAGS_LISTFILES. (Christian Brabandt, closes vim/vim#1399)

ba47b51ff8
This commit is contained in:
KunMing Xie 2017-11-11 08:26:55 +08:00 committed by Justin M. Keyes
parent 4fa0970519
commit a2fdd0a72f
3 changed files with 14 additions and 2 deletions

View File

@ -4147,7 +4147,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 {
new_len = len + 2; /* +2 for '^' at start, NUL at end */ new_len = len + 2; /* +2 for '^' at start, NUL at end */

View File

@ -296,3 +296,13 @@ func Test_illegal_address2()
call delete('Xtest.vim') call delete('Xtest.vim')
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

@ -867,7 +867,7 @@ static const int included_patches[] = {
// 240 NA // 240 NA
// 239 NA // 239 NA
// 238, // 238,
// 237, 237,
// 236, // 236,
235, 235,
// 234, // 234,