From 63b5f05d4724bba9aa33fd813ac1f4f93c891260 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 19 Jun 2018 04:51:51 -0400 Subject: vim-patch:8.0.0455: the mode test may hang (#8577) Problem: The mode test may hang in Test_mode(). (Michael Soyka) Solution: Set 'complete' to only search the current buffer (as suggested by Michael) https://github.com/vim/vim/commit/ffea8c99d9658b0b51a848a6f674851851e78fa7 --- src/nvim/testdir/test_functions.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 8847653498..3028f72fec 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -373,15 +373,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 =Save_mode() normal! 3G @@ -490,6 +493,7 @@ func! Test_mode() bwipe! iunmap + set complete& endfunc func Test_getbufvar() -- cgit