aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2017-11-11 08:26:55 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-11-11 01:26:55 +0100
commita2fdd0a72f9d1f72f2e49e80719902a6f555454e (patch)
treec713f0ae1481ad5cf2eabaa8e4678909d205cf85 /src
parent4fa0970519c332350ce7cc687a0cd93ace17f5ca (diff)
downloadrneovim-a2fdd0a72f9d1f72f2e49e80719902a6f555454e.tar.gz
rneovim-a2fdd0a72f9d1f72f2e49e80719902a6f555454e.tar.bz2
rneovim-a2fdd0a72f9d1f72f2e49e80719902a6f555454e.zip
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) https://github.com/vim/vim/commit/ba47b51ff88d91c9bb5aa522183e23a656865697
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_getln.c4
-rw-r--r--src/nvim/testdir/test_cmdline.vim10
-rw-r--r--src/nvim/version.c2
3 files changed, 14 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 43e7cf457d..9c9ccbca4d 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -4147,7 +4147,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 {
new_len = len + 2; /* +2 for '^' at start, NUL at end */
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 5abff1838d..5fc519f822 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -296,3 +296,13 @@ func Test_illegal_address2()
call delete('Xtest.vim')
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
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 16a265fed3..05725a59f9 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -867,7 +867,7 @@ static const int included_patches[] = {
// 240 NA
// 239 NA
// 238,
- // 237,
+ 237,
// 236,
235,
// 234,