diff src/testdir/test_functions.vim @ 11135:c4e4387bbd50 v8.0.0455

patch 8.0.0455: the mode test may hang commit https://github.com/vim/vim/commit/ffea8c99d9658b0b51a848a6f674851851e78fa7 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 13 20:37:15 2017 +0100 patch 8.0.0455: the mode test may hang Problem: The mode test may hang in Test_mode(). (Michael Soyka) Solution: Set 'complete' to only search the current buffer (as suggested by Michael)
author Christian Brabandt <cb@256bit.org>
date Mon, 13 Mar 2017 20:45:04 +0100
parents 5763281d212a
children 445fd6be2009
line wrap: on
line diff
--- 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()