forked from aniani/vim
Problem: May get ml_get error when :tcldo deletes lines or switches to
another buffer. (Nikolai Pavlov, closes #1421)
Solution: Check the buffer and line every time.
24 lines
471 B
VimL
24 lines
471 B
VimL
" Tests for the Tcl interface.
|
|
|
|
if !has('tcl')
|
|
finish
|
|
end
|
|
|
|
function Test_tcldo()
|
|
" Check deleting lines does not trigger ml_get error.
|
|
new
|
|
call setline(1, ['one', 'two', 'three'])
|
|
tcldo ::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'])
|
|
tcldo ::vim::command new
|
|
call assert_equal(wincount + 1, winnr('$'))
|
|
bwipe!
|
|
bwipe!
|
|
endfunc
|
|
|