]> granicus.if.org Git - vim/commitdiff
patch 8.0.0455: the mode test may hang v8.0.0455
authorBram Moolenaar <Bram@vim.org>
Mon, 13 Mar 2017 19:37:15 +0000 (20:37 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 13 Mar 2017 19:37:15 +0000 (20:37 +0100)
Problem:    The mode test may hang in Test_mode(). (Michael Soyka)
Solution:   Set 'complete' to only search the current buffer (as suggested by
            Michael)

src/testdir/test_functions.vim
src/version.c

index af877e49b165df61b875aed507b028fe1b0a484a..e2a4e8c7dffee798e1021facf8b328803c151884 100644 (file)
@@ -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()
index 2f9c3150d324a51618f8ef041ffc049b0e0040b3..aa40ae1fd92533f4faec158daf6a32b59a064bca 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    455,
 /**/
     454,
 /**/