diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-07-23 22:02:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-07-23 22:02:02 +0200 |
commit | c31f9ae4f1976544522313b182957793063ee02c (patch) | |
tree | aaade7d671291b0ec853fe0c6a8d44f525d05f05 /src/testdir | |
parent | 1f2903c43109b16594d141a730659317b15f388d (diff) |
patch 8.0.0762: ml_get error with :psearch in buffer without a namev8.0.0762
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.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/Make_all.mak | 1 | ||||
-rw-r--r-- | src/testdir/test_preview.vim | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak index 36279d82b1..1f8d307290 100644 --- a/src/testdir/Make_all.mak +++ b/src/testdir/Make_all.mak @@ -175,6 +175,7 @@ NEW_TESTS = test_arabic.res \ test_packadd.res \ test_paste.res \ test_perl.res \ + test_preview.res \ test_profile.res \ test_python2.res \ test_python3.res \ diff --git a/src/testdir/test_preview.vim b/src/testdir/test_preview.vim new file mode 100644 index 0000000000..91923fb1e9 --- /dev/null +++ b/src/testdir/test_preview.vim @@ -0,0 +1,13 @@ +" 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 |