summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-13 20:37:15 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-13 20:37:15 +0100
commitffea8c99d9658b0b51a848a6f674851851e78fa7 (patch)
treef73f0784329193513147643ae4dddc04beda66a2
parent977d03733601948ab334fec24d0da82bc18c57c3 (diff)
patch 8.0.0455: the mode test may hangv8.0.0455
Problem: The mode test may hang in Test_mode(). (Michael Soyka) Solution: Set 'complete' to only search the current buffer (as suggested by Michael)
-rw-r--r--src/testdir/test_functions.vim8
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index af877e49b1..e2a4e8c7df 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -313,15 +313,18 @@ endfunc
" Tests for the mode() function
let current_modes = ''
-func! Save_mode()
+func Save_mode()
let g:current_modes = mode(0) . '-' . mode(1)
return ''
endfunc
-func! Test_mode()
+func Test_mode()
new
call append(0, ["Blue Ball Black", "Brown Band Bowl", ""])
+ " Only complete from the current buffer.
+ set complete=.
+
inoremap <F2> <C-R>=Save_mode()<CR>
normal! 3G
@@ -430,6 +433,7 @@ func! Test_mode()
bwipe!
iunmap <F2>
+ set complete&
endfunc
func Test_getbufvar()
diff --git a/src/version.c b/src/version.c
index 2f9c3150d3..aa40ae1fd9 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 455,
+/**/
454,
/**/
453,