mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00

Problem: ml_get error with :psearch in buffer without a name. (Dominique
Pelle)
Solution: Use the buffer number instead of the file name. Check the cursor
position.
c31f9ae4f1
14 lines
248 B
VimL
14 lines
248 B
VimL
" Tests for the preview window
|
|
|
|
func Test_Psearch()
|
|
" this used to cause ml_get errors
|
|
help
|
|
let wincount = winnr('$')
|
|
0f
|
|
ps.
|
|
call assert_equal(wincount + 1, winnr('$'))
|
|
pclose
|
|
call assert_equal(wincount, winnr('$'))
|
|
bwipe
|
|
endfunc
|