aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-04 21:52:01 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-05 06:59:05 +0800
commitddc363dce9020bce7d5bd931929f0d11cc87ad6d (patch)
tree3874a940d7445f173e02164ddd5c1fb288dde29c /src/nvim/testdir
parent6abb48105135ce3ae7eda22334f8104c5ddf20ce (diff)
downloadrneovim-ddc363dce9020bce7d5bd931929f0d11cc87ad6d.tar.gz
rneovim-ddc363dce9020bce7d5bd931929f0d11cc87ad6d.tar.bz2
rneovim-ddc363dce9020bce7d5bd931929f0d11cc87ad6d.zip
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.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_display.vim35
1 files changed, 25 insertions, 10 deletions
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\<CR>")
- call VerifyScreenDump(buf, 'Test_display_lastline_2', {})
+ call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}2', {})
call term_sendkeys(buf, ":100wincmd >\<CR>")
- call VerifyScreenDump(buf, 'Test_display_lastline_3', {})
+ call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}3', {})
call term_sendkeys(buf, ":set display=truncate\<CR>")
- call VerifyScreenDump(buf, 'Test_display_lastline_4', {})
+ call VerifyScreenDump(buf, $'Test_display_lastline_{a:euro}4', {})
+
+ call term_sendkeys(buf, ":close\<CR>")
+ call term_sendkeys(buf, ":3split\<CR>")
+ 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