diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-29 22:59:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-29 22:59:12 +0100 |
commit | 85b5743d3e69f96882b6124d4b4ebf873ca24707 (patch) | |
tree | c2449a5ef9a093791d15119dad00140ea570e3d7 /src/testdir/test_perl.vim | |
parent | d58f03b1c21b5b0242718f89da53ddd67b1eff6b (diff) | |
download | vim-85b5743d3e69f96882b6124d4b4ebf873ca24707.zip |
patch 8.0.0269: may get ml_get error when :perldo deletes lines
Problem: May get ml_get error when :perldo deletes lines or switches to
another buffer. (Nikolai Pavlov, issue #1421)
Solution: Check the buffer and line every time.
Diffstat (limited to 'src/testdir/test_perl.vim')
-rw-r--r-- | src/testdir/test_perl.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_perl.vim b/src/testdir/test_perl.vim index da47ab153..f2b991aa7 100644 --- a/src/testdir/test_perl.vim +++ b/src/testdir/test_perl.vim @@ -82,6 +82,21 @@ function Test_perldo() 1 call assert_false(search('\Cperl')) bw! + + " Check deleting lines does not trigger ml_get error. + new + call setline(1, ['one', 'two', 'three']) + perldo VIM::DoCommand("%d_") + bwipe! + + " Check switching to another buffer does not trigger ml_get error. + new + let wincount = winnr('$') + call setline(1, ['one', 'two', 'three']) + perldo VIM::DoCommand("new") + call assert_equal(wincount + 1, winnr('$')) + bwipe! + bwipe! endfunc function Test_VIM_package() |