diff options
Diffstat (limited to 'src/nvim/testdir/test_display.vim')
-rw-r--r-- | src/nvim/testdir/test_display.vim | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 13796449ab..b642f39c9f 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -195,8 +195,6 @@ func Test_edit_long_file_name() call VerifyScreenDump(buf, 'Test_long_file_name_1', {}) - call term_sendkeys(buf, ":q\<cr>") - " clean up call StopVimInTerminal(buf) call delete(longName) @@ -228,7 +226,6 @@ endfunc " Test for scrolling that modifies buffer during visual block func Test_visual_block_scroll() - " See test/functional/legacy/visual_mode_spec.lua CheckScreendump let lines =<< trim END @@ -239,7 +236,7 @@ func Test_visual_block_scroll() END let filename = 'Xvisualblockmodifiedscroll' - call writefile(lines, filename) + call writefile(lines, filename, 'D') let buf = RunVimInTerminal('-S '.filename, #{rows: 7}) call term_sendkeys(buf, "V\<C-D>\<C-D>") @@ -247,11 +244,40 @@ func Test_visual_block_scroll() call VerifyScreenDump(buf, 'Test_display_visual_block_scroll', {}) call StopVimInTerminal(buf) - call delete(filename) +endfunc + +" Test for clearing paren highlight when switching buffers +func Test_matchparen_clear_highlight() + CheckScreendump + + let lines =<< trim END + source $VIMRUNTIME/plugin/matchparen.vim + set hidden + call setline(1, ['()']) + normal 0 + + func OtherBuffer() + enew + exe "normal iaa\<Esc>0" + endfunc + END + call writefile(lines, 'XMatchparenClear', 'D') + let buf = RunVimInTerminal('-S XMatchparenClear', #{rows: 5}) + call VerifyScreenDump(buf, 'Test_matchparen_clear_highlight_1', {}) + + call term_sendkeys(buf, ":call OtherBuffer()\<CR>:\<Esc>") + call VerifyScreenDump(buf, 'Test_matchparen_clear_highlight_2', {}) + + call term_sendkeys(buf, "\<C-^>:\<Esc>") + call VerifyScreenDump(buf, 'Test_matchparen_clear_highlight_1', {}) + + call term_sendkeys(buf, "\<C-^>:\<Esc>") + call VerifyScreenDump(buf, 'Test_matchparen_clear_highlight_2', {}) + + call StopVimInTerminal(buf) endfunc func Test_display_scroll_at_topline() - " See test/functional/legacy/display_spec.lua CheckScreendump let buf = RunVimInTerminal('', #{cols: 20}) |