From fd70018e21b8ce4b8c9f6074854e0174a87dfbb5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 19 Dec 2021 09:55:17 +0800 Subject: vim-patch:8.2.2508: cannot change the character displayed in non existing lines Problem: Cannot change the character displayed in non existing lines. Solution: Add the "eob" item to 'fillchars'. (closes vim/vim#7832, closes vim/vim#3820) https://github.com/vim/vim/commit/a98f8a230596d8fb44cc68321de72980a21428cb Nvim has already implemented this feature, so this just ports the tests and docs. --- src/nvim/testdir/test_display.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 12327f34d6..f8ebb31b45 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -263,6 +263,28 @@ func Test_display_scroll_at_topline() call StopVimInTerminal(buf) endfunc +" Test for 'eob' (EndOfBuffer) item in 'fillchars' +func Test_eob_fillchars() + " default value (skipped) + " call assert_match('eob:\~', &fillchars) + " invalid values + call assert_fails(':set fillchars=eob:', 'E474:') + call assert_fails(':set fillchars=eob:xy', 'E474:') + call assert_fails(':set fillchars=eob:\255', 'E474:') + call assert_fails(':set fillchars=eob:', 'E474:') + " default is ~ + new + call assert_equal('~', Screenline(2)) + set fillchars=eob:+ + redraw! + call assert_equal('+', Screenline(2)) + set fillchars=eob:\ + redraw! + call assert_equal(' ', nr2char(screenchar(2, 1))) + set fillchars& + close +endfunc + func Test_display_linebreak_breakat() new vert resize 25 -- cgit