diff options
| author | Marco Hinz <mh.codebro@gmail.com> | 2019-01-25 16:45:29 +0100 |
|---|---|---|
| committer | Marco Hinz <mh.codebro@gmail.com> | 2019-01-26 14:45:48 +0100 |
| commit | 2ae97f3d4c572387aa639af5d8550235bf0a2979 (patch) | |
| tree | 77613f3e9a6adb7a62c4f1da5ac045c337128618 /src/nvim/testdir | |
| parent | 2418aa3a4ac8f560373b940dbe0443fc79ab65ad (diff) | |
| download | rneovim-2ae97f3d4c572387aa639af5d8550235bf0a2979.tar.gz rneovim-2ae97f3d4c572387aa639af5d8550235bf0a2979.tar.bz2 rneovim-2ae97f3d4c572387aa639af5d8550235bf0a2979.zip | |
vim-patch:8.1.0759: showing two characters for tab is limited
Problem: Showing two characters for tab is limited.
Solution: Allow for a third character for "tab:" in 'listchars'. (Nathaniel
Braun, Ken Takata, closes vim/vim#3810)
https://github.com/vim/vim/commit/83a52171ba00b2b9fd2d1d22a07e38fc9fc69c1e
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_listchars.vim | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listchars.vim b/src/nvim/testdir/test_listchars.vim index 57ea7ca5a9..4899f59910 100644 --- a/src/nvim/testdir/test_listchars.vim +++ b/src/nvim/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 |