mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 06:16:08 +00:00
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)
ffea8c99d9
This commit is contained in:

committed by
Justin M. Keyes

parent
3c24a6c317
commit
63b5f05d47
@@ -373,15 +373,18 @@ endfunc
|
|||||||
|
|
||||||
" Tests for the mode() function
|
" Tests for the mode() function
|
||||||
let current_modes = ''
|
let current_modes = ''
|
||||||
func! Save_mode()
|
func Save_mode()
|
||||||
let g:current_modes = mode(0) . '-' . mode(1)
|
let g:current_modes = mode(0) . '-' . mode(1)
|
||||||
return ''
|
return ''
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func! Test_mode()
|
func Test_mode()
|
||||||
new
|
new
|
||||||
call append(0, ["Blue Ball Black", "Brown Band Bowl", ""])
|
call append(0, ["Blue Ball Black", "Brown Band Bowl", ""])
|
||||||
|
|
||||||
|
" Only complete from the current buffer.
|
||||||
|
set complete=.
|
||||||
|
|
||||||
inoremap <F2> <C-R>=Save_mode()<CR>
|
inoremap <F2> <C-R>=Save_mode()<CR>
|
||||||
|
|
||||||
normal! 3G
|
normal! 3G
|
||||||
@@ -490,6 +493,7 @@ func! Test_mode()
|
|||||||
|
|
||||||
bwipe!
|
bwipe!
|
||||||
iunmap <F2>
|
iunmap <F2>
|
||||||
|
set complete&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_getbufvar()
|
func Test_getbufvar()
|
||||||
|
Reference in New Issue
Block a user