diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-27 17:39:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-27 17:39:15 +0200 |
commit | 298466629119eda501cfdf7824797f05045e67ca (patch) | |
tree | 44a6c3979fb2891d69246db76cf9bc1cc48c9e84 /src/testdir/test_bufline.vim | |
parent | 1417c766f55e5959b31da488417b7d9b141404af (diff) | |
download | vim-git-298466629119eda501cfdf7824797f05045e67ca.tar.gz |
patch 8.1.1757: text added with appendbufline() isn't displayedv8.1.1757
Problem: Text added with appendbufline() to another buffer isn't displayed.
Solution: Update topline. (partly by Christian Brabandt, closes #4718)
Diffstat (limited to 'src/testdir/test_bufline.vim')
-rw-r--r-- | src/testdir/test_bufline.vim | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testdir/test_bufline.vim b/src/testdir/test_bufline.vim index dbcd2e0fd..eb46104a8 100644 --- a/src/testdir/test_bufline.vim +++ b/src/testdir/test_bufline.vim @@ -1,6 +1,7 @@ " Tests for setbufline(), getbufline(), appendbufline(), deletebufline() source shared.vim +source screendump.vim func Test_setbufline_getbufline() new @@ -144,3 +145,28 @@ func Test_deletebufline() call assert_equal(['b', 'c'], getbufline(b, 1, 2)) exe "bwipe! " . b endfunc + +func Test_appendbufline_redraw() + if !CanRunVimInTerminal() + throw 'Skipped: cannot make screendumps' + endif + let lines =<< trim END + new foo + let winnr=bufwinnr('foo') + let buf=bufnr('foo') + wincmd p + call appendbufline(buf, '$', range(1,200)) + exe winnr. 'wincmd w' + norm! G + wincmd p + call deletebufline(buf, 1, '$') + call appendbufline(buf, '$', 'Hello Vim world...') + END + call writefile(lines, 'XscriptMatchCommon') + let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 10}) + call term_wait(buf) + call VerifyScreenDump(buf, 'Test_appendbufline_1', {}) + + call StopVimInTerminal(buf) + call delete('XscriptMatchCommon') +endfunc |