diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2018-06-19 04:51:51 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-19 10:51:51 +0200 |
commit | 63b5f05d4724bba9aa33fd813ac1f4f93c891260 (patch) | |
tree | 303098d6ccb0e05f3357f0e3d90b68d3d5bd0790 | |
parent | 3c24a6c3176fc461295f9bc8119768dcea579ee3 (diff) | |
download | rneovim-63b5f05d4724bba9aa33fd813ac1f4f93c891260.tar.gz rneovim-63b5f05d4724bba9aa33fd813ac1f4f93c891260.tar.bz2 rneovim-63b5f05d4724bba9aa33fd813ac1f4f93c891260.zip |
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
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 8 |
1 files 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 <F2> <C-R>=Save_mode()<CR> normal! 3G @@ -490,6 +493,7 @@ func! Test_mode() bwipe! iunmap <F2> + set complete& endfunc func Test_getbufvar() |