diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-29 22:48:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-29 22:48:45 +0100 |
commit | d58f03b1c21b5b0242718f89da53ddd67b1eff6b (patch) | |
tree | 8d26ad06a50967f6e14eb24e2556e38bae7091ae /src/testdir/test_lua.vim | |
parent | 6fe2eb43d2527cc8a3450456a60639e87f16d32d (diff) | |
download | vim-git-d58f03b1c21b5b0242718f89da53ddd67b1eff6b.tar.gz |
patch 8.0.0268: may get ml_get error when :luado deletes linesv8.0.0268
Problem: May get ml_get error when :luado 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_lua.vim')
-rw-r--r-- | src/testdir/test_lua.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim new file mode 100644 index 000000000..944ad903f --- /dev/null +++ b/src/testdir/test_lua.vim @@ -0,0 +1,22 @@ +" Tests for Lua. +" TODO: move tests from test85.in here. + +if !has('lua') + finish +endif + +func Test_luado() + new + call setline(1, ['one', 'two', 'three']) + luado vim.command("%d_") + bwipe! + + " Check switching to another buffer does not trigger ml_get error. + new + let wincount = winnr('$') + call setline(1, ['one', 'two', 'three']) + luado vim.command("new") + call assert_equal(wincount + 1, winnr('$')) + bwipe! + bwipe! +endfunc |