diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-31 21:57:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-31 21:57:21 +0100 |
commit | 895d966e341c187ffcf9da88dba193cbfcebf000 (patch) | |
tree | 7ed600056bc325fbf3772d2ebc555d4116bcf43b /src/testdir/test_listchars.vim | |
parent | 375e3390078e740d3c83b0c118c50d9a920036c7 (diff) | |
download | vim-git-895d966e341c187ffcf9da88dba193cbfcebf000.tar.gz |
patch 8.1.0865: when 'listchars' only contains "nbsp:X" it does not workv8.1.0865
Problem: When 'listchars' only contains "nbsp:X" it does not work.
Solution: Set extra_check when lcs_nbsp is set. (Ralf Schandl, closes #3889)
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 4899f5991..2870f2d4e 100644 --- a/src/testdir/test_listchars.vim +++ b/src/testdir/test_listchars.vim @@ -90,6 +90,26 @@ func Test_listchars() \ '.....h>-$', \ 'iii<<<<><<$', '$'], l) + + " test nbsp + normal ggdG + set listchars=nbsp:X,trail:Y + set list + " Non-breaking space + let nbsp = nr2char(0xa0) + call append(0, [ ">".nbsp."<" ]) + + let expected = '>X< ' + + redraw! + call cursor(1, 1) + call assert_equal([expected], ScreenLines(1, virtcol('$'))) + + set listchars=nbsp:X + redraw! + call cursor(1, 1) + call assert_equal([expected], ScreenLines(1, virtcol('$'))) + enew! set listchars& ff& endfunc |