1
0
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:
Bram Moolenaar
2017-09-04 20:34:19 +02:00
parent e88fc7a574
commit 9d954207e2
6 changed files with 31 additions and 7 deletions

View File

@@ -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