diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-03 22:55:50 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-03 22:55:50 +0200 |
commit | 3c8ee629745737aa231fdd123826ae021e398e49 (patch) | |
tree | ede1f3b7673776045644a1059d14af30295cfe51 /src/testdir/test_display.vim | |
parent | ac92e25a33c37ec5becbfffeccda136c73b761ac (diff) | |
download | vim-git-3c8ee629745737aa231fdd123826ae021e398e49.tar.gz |
patch 8.1.1804: no test for display updating without a scroll regionv8.1.1804
Problem: No test for display updating without a scroll region.
Solution: Add a test.
Diffstat (limited to 'src/testdir/test_display.vim')
-rw-r--r-- | src/testdir/test_display.vim | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim index 81ffb2c94..dfa641bbd 100644 --- a/src/testdir/test_display.vim +++ b/src/testdir/test_display.vim @@ -4,11 +4,12 @@ if !has('gui_running') && has('unix') endif source view_util.vim +source check.vim +source screendump.vim func Test_display_foldcolumn() - if !has("folding") - return - endif + CheckFeature folding + new vnew vert resize 25 @@ -24,10 +25,10 @@ func Test_display_foldcolumn() call cursor(2, 1) norm! zt - let lines=ScreenLines([1,2], winwidth(0)) + let lines = ScreenLines([1,2], winwidth(0)) call assert_equal(expect, lines) set fdc=2 - let lines=ScreenLines([1,2], winwidth(0)) + let lines = ScreenLines([1,2], winwidth(0)) let expect = [ \ " e more noise blah blah<", \ " 82> more stuff here " @@ -39,9 +40,8 @@ func Test_display_foldcolumn() endfunc func Test_display_foldtext_mbyte() - if !has("folding") - return - endif + CheckFeature folding + call NewWindow(10, 40) call append(0, range(1,20)) exe "set foldmethod=manual foldtext=foldtext() fillchars=fold:\u2500,vert:\u2502 fdc=2" @@ -67,3 +67,28 @@ func Test_display_foldtext_mbyte() set foldtext& fillchars& foldmethod& fdc& bw! endfunc + +" check that win_ins_lines() and win_del_lines() work when t_cs is empty. +func Test_scroll_without_region() + CheckScreendump + + let lines =<< trim END + call setline(1, range(1, 20)) + set t_cs= + set laststatus=2 + END + call writefile(lines, 'Xtestscroll') + let buf = RunVimInTerminal('-S Xtestscroll', #{rows: 10}) + + call VerifyScreenDump(buf, 'Test_scroll_no_region_1', {}) + + call term_sendkeys(buf, ":3delete\<cr>") + call VerifyScreenDump(buf, 'Test_scroll_no_region_2', {}) + + call term_sendkeys(buf, ":4put\<cr>") + call VerifyScreenDump(buf, 'Test_scroll_no_region_3', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtestscroll') +endfunc |