forked from aniani/vim
patch 8.0.1053: setline() does not work on startup
Problem: setline() does not work on startup. (Manuel Ortega)
Solution: Do not check for ml_mfp to be set for the current buffer.
(Christian Brabandt)
This commit is contained in:
@@ -24,3 +24,16 @@ func Test_setbufline_getbufline()
|
||||
call assert_equal([], getbufline(b, 6))
|
||||
exe "bwipe! " . b
|
||||
endfunc
|
||||
|
||||
func Test_setline_startup()
|
||||
let cmd = GetVimCommand('Xscript')
|
||||
if cmd == ''
|
||||
return
|
||||
endif
|
||||
call writefile(['call setline(1, "Hello")', 'w Xtest', 'q!'], 'Xscript')
|
||||
call system(cmd)
|
||||
call assert_equal(['Hello'], readfile('Xtest'))
|
||||
|
||||
call delete('Xscript')
|
||||
call delete('Xtest')
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user