diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-17 14:10:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-17 14:10:56 +0200 |
commit | 69cbbecf548f390197259ca30cfe147c3e59ce5a (patch) | |
tree | 85d93e5c0dc8578860e1511fc80cc6f8d9a74a9e /src/testdir/test_listchars.vim | |
parent | 315244d85b9b8faae549b1700e8cc2e45eaa68ea (diff) | |
download | vim-git-69cbbecf548f390197259ca30cfe147c3e59ce5a.tar.gz |
patch 8.1.1868: multi-byte chars in 'listchars' fail with 'linebreak' setv8.1.1868
Problem: Multibyte characters in 'listchars' don't work correctly if
'linebreak' is also enabled. (Martin Tournoij)
Solution: Make it work correctly. (Christian Brabandt, closes #4822,
closes #4812)
Diffstat (limited to 'src/testdir/test_listchars.vim')
-rw-r--r-- | src/testdir/test_listchars.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_listchars.vim b/src/testdir/test_listchars.vim index 5df501039..a304c53d1 100644 --- a/src/testdir/test_listchars.vim +++ b/src/testdir/test_listchars.vim @@ -58,6 +58,26 @@ func Test_listchars() call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) endfor + " tab with 3rd character and linebreak set + set listchars-=tab:<=> + set listchars+=tab:<·> + set linebreak + 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 nolinebreak + set listchars-=tab:<·> + set listchars+=tab:<=> + set listchars-=trail:- let expected = [ \ '<======>aa<====>$', |