diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-08-26 08:52:13 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-26 10:14:58 +0800 |
| commit | 1ba3d5c712dcc2e2ee35c6bc27d9965f671f967a (patch) | |
| tree | 251eb3db5812e235e08f9b5313a199831f0a8965 /src/nvim/testdir/test_display.vim | |
| parent | c12f6002a15b27ada972b997bc0950f37d06027d (diff) | |
| download | rneovim-1ba3d5c712dcc2e2ee35c6bc27d9965f671f967a.tar.gz rneovim-1ba3d5c712dcc2e2ee35c6bc27d9965f671f967a.tar.bz2 rneovim-1ba3d5c712dcc2e2ee35c6bc27d9965f671f967a.zip | |
vim-patch:8.2.2524: cannot change the characters displayed in the foldcolumn
Problem: Cannot change the characters displayed in the foldcolumn.
Solution: Add fields to 'fillchars'. (Yegappan Lakshmanan, Matthieu Coudron,
closes vim/vim#7860)
https://github.com/vim/vim/commit/3aca5a6fbcfbf5f4492b9ea0c4308ac524d33606
Diffstat (limited to 'src/nvim/testdir/test_display.vim')
| -rw-r--r-- | src/nvim/testdir/test_display.vim | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 6938abbc28..a30d57016a 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -309,6 +309,60 @@ func Test_eob_fillchars() close endfunc +" Test for 'foldopen', 'foldclose' and 'foldsep' in 'fillchars' +func Test_fold_fillchars() + new + set fdc=2 foldenable foldmethod=manual + call setline(1, ['one', 'two', 'three', 'four', 'five']) + 2,4fold + " First check for the default setting for a closed fold + let lines = ScreenLines([1, 3], 8) + let expected = [ + \ ' one ', + \ '+ +-- 3', + \ ' five ' + \ ] + call assert_equal(expected, lines) + normal 2Gzo + " check the characters for an open fold + let lines = ScreenLines([1, 5], 8) + let expected = [ + \ ' one ', + \ '- two ', + \ '| three ', + \ '| four ', + \ ' five ' + \ ] + call assert_equal(expected, lines) + + " change the setting + set fillchars=vert:\|,fold:-,eob:~,foldopen:[,foldclose:],foldsep:- + + " check the characters for an open fold + let lines = ScreenLines([1, 5], 8) + let expected = [ + \ ' one ', + \ '[ two ', + \ '- three ', + \ '- four ', + \ ' five ' + \ ] + call assert_equal(expected, lines) + + " check the characters for a closed fold + normal 2Gzc + let lines = ScreenLines([1, 3], 8) + let expected = [ + \ ' one ', + \ '] +-- 3', + \ ' five ' + \ ] + call assert_equal(expected, lines) + + %bw! + set fillchars& fdc& foldmethod& foldenable& +endfunc + func Test_display_linebreak_breakat() new vert resize 25 |