aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-24 14:02:51 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-24 14:04:20 -0400
commit4fedef51b0bdb641432422b93dd5f3886f3e4283 (patch)
tree3ff61b67df832de5bd6fb6a0af7ce7bcf27ea9a5 /src/nvim/testdir
parent34e416667378a610943f614b97da9b865d622806 (diff)
downloadrneovim-4fedef51b0bdb641432422b93dd5f3886f3e4283.tar.gz
rneovim-4fedef51b0bdb641432422b93dd5f3886f3e4283.tar.bz2
rneovim-4fedef51b0bdb641432422b93dd5f3886f3e4283.zip
vim-patch:8.1.1757: text added with appendbufline() isn't displayed
Problem: Text added with appendbufline() to another buffer isn't displayed. Solution: Update topline. (partly by Christian Brabandt, closes vim/vim#4718) https://github.com/vim/vim/commit/298466629119eda501cfdf7824797f05045e67ca
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_bufline.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_bufline.vim b/src/nvim/testdir/test_bufline.vim
index 1f83e8b776..a924ce0002 100644
--- a/src/nvim/testdir/test_bufline.vim
+++ b/src/nvim/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
@@ -112,3 +113,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