From ddc363dce9020bce7d5bd931929f0d11cc87ad6d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 4 Oct 2022 21:52:01 +0800 Subject: vim-patch:9.0.0656: cannot specify another character to use instead of '@' Problem: Cannot specify another character to use instead of '@' at the end of the window. Solution: Add "lastline" to 'fillchars'. (Martin Tournoij, closes vim/vim#11264, closes vim/vim#10963) https://github.com/vim/vim/commit/4ba5f1dab656103e8f4a4505452d1816b9e83c1e Use latest code in drawscreen.c instead. --- src/nvim/testdir/test_display.vim | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 217bb5d781..0962429f71 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -407,30 +407,45 @@ func Test_display_linebreak_breakat() let &breakat=_breakat endfunc -func Test_display_lastline() - CheckScreendump - +func Run_Test_display_lastline(euro) let lines =<< trim END - call setline(1, ['aaa', 'b'->repeat(100)]) + call setline(1, ['aaa', 'b'->repeat(200)]) set display=truncate + vsplit 100wincmd < END - call writefile(lines, 'XdispLastline') + if a:euro != '' + let lines[2] = 'set fillchars=vert:\|,lastline:€' + endif + call writefile(lines, 'XdispLastline', 'D') let buf = RunVimInTerminal('-S XdispLastline', #{rows: 10}) - call VerifyScreenDump(buf, 'Test_display_lastline_1', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}1', {}) call term_sendkeys(buf, ":set display=lastline\") - call VerifyScreenDump(buf, 'Test_display_lastline_2', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}2', {}) call term_sendkeys(buf, ":100wincmd >\") - call VerifyScreenDump(buf, 'Test_display_lastline_3', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}3', {}) call term_sendkeys(buf, ":set display=truncate\") - call VerifyScreenDump(buf, 'Test_display_lastline_4', {}) + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}4', {}) + + call term_sendkeys(buf, ":close\") + call term_sendkeys(buf, ":3split\") + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}5', {}) call StopVimInTerminal(buf) - call delete('XdispLastline') +endfunc + +func Test_display_lastline() + CheckScreendump + + call Run_Test_display_lastline('') + call Run_Test_display_lastline('euro_') + + call assert_fails(':set fillchars=lastline:', 'E474:') + call assert_fails(':set fillchars=lastline:〇', 'E474:') endfunc -- cgit From 98bb2c19309ced1131afce4fc2cdae518d0a2dcd Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 5 Oct 2022 06:48:40 +0800 Subject: vim-patch:9.0.0661: multi-byte "lastline" in 'fillchars' does not work properly Problem: Multi-byte "lastline" item in 'fillchars' does not work properly when the window is two columns wide. Solution: Compute the text length correctly. (closes vim/vim#11280) https://github.com/vim/vim/commit/18b3500b8c517e44c23197e558aa36aed1c6916c --- src/nvim/testdir/test_display.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 0962429f71..13796449ab 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -435,6 +435,10 @@ func Run_Test_display_lastline(euro) call term_sendkeys(buf, ":3split\") call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}5', {}) + call term_sendkeys(buf, ":close\") + call term_sendkeys(buf, ":2vsplit\") + call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}6', {}) + call StopVimInTerminal(buf) endfunc -- cgit