comparison src/testdir/test_lua.vim @ 10757:6c3d42d18366 v8.0.0268

patch 8.0.0268: may get ml_get error when :luado deletes lines commit https://github.com/vim/vim/commit/d58f03b1c21b5b0242718f89da53ddd67b1eff6b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 29 22:48:45 2017 +0100 patch 8.0.0268: may get ml_get error when :luado deletes lines Problem: May get ml_get error when :luado deletes lines or switches to another buffer. (Nikolai Pavlov, issue https://github.com/vim/vim/issues/1421) Solution: Check the buffer and line every time.
author Christian Brabandt <cb@256bit.org>
date Sun, 29 Jan 2017 23:00:04 +0100
parents
children 2e95ea9afa1e
comparison
equal deleted inserted replaced
10756:3fb388114d94 10757:6c3d42d18366
1 " Tests for Lua.
2 " TODO: move tests from test85.in here.
3
4 if !has('lua')
5 finish
6 endif
7
8 func Test_luado()
9 new
10 call setline(1, ['one', 'two', 'three'])
11 luado vim.command("%d_")
12 bwipe!
13
14 " Check switching to another buffer does not trigger ml_get error.
15 new
16 let wincount = winnr('$')
17 call setline(1, ['one', 'two', 'three'])
18 luado vim.command("new")
19 call assert_equal(wincount + 1, winnr('$'))
20 bwipe!
21 bwipe!
22 endfunc