diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-16 22:41:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-16 22:41:54 +0100 |
commit | 83a52171ba00b2b9fd2d1d22a07e38fc9fc69c1e (patch) | |
tree | 5b8e1eaf85ad03ccaa27aec30fff6775bef44d71 /src/testdir/test_listchars.vim | |
parent | 500f36108031c75befb6a04cac2ceeb592d8cf00 (diff) | |
download | vim-git-83a52171ba00b2b9fd2d1d22a07e38fc9fc69c1e.tar.gz |
patch 8.1.0759: showing two characters for tab is limitedv8.1.0759
Problem: Showing two characters for tab is limited.
Solution: Allow for a third character for "tab:" in 'listchars'. (Nathaniel
Braun, Ken Takata, closes #3810)
Diffstat (limited to 'src/testdir/test_listchars.vim')
-rw-r--r-- | src/testdir/test_listchars.vim | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/testdir/test_listchars.vim b/src/testdir/test_listchars.vim index 57ea7ca5a..4899f5991 100644 --- a/src/testdir/test_listchars.vim +++ b/src/testdir/test_listchars.vim @@ -42,6 +42,38 @@ func Test_listchars() call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) endfor + " tab with 3rd character. + set listchars-=tab:>- + set listchars+=tab:<=>,trail:- + let expected = [ + \ '<======>aa<====>$', + \ '..bb<==>--$', + \ '...cccc>-$', + \ 'dd........ee--<>$', + \ '-$' + \ ] + redraw! + for i in range(1, 5) + call cursor(i, 1) + call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) + endfor + + set listchars-=trail:- + let expected = [ + \ '<======>aa<====>$', + \ '..bb<==>..$', + \ '...cccc>.$', + \ 'dd........ee..<>$', + \ '.$' + \ ] + redraw! + for i in range(1, 5) + call cursor(i, 1) + call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) + endfor + + set listchars-=tab:<=> + set listchars+=tab:>- set listchars+=trail:< set nolist normal ggdG |