diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-08 20:41:35 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-08 21:05:10 -0400 |
| commit | 924f1173cb120b36df738e02d60c6c864ed1ffac (patch) | |
| tree | 9058c55311d77ca4f7497b89cc2f86a2c8721c99 /src/nvim/testdir | |
| parent | 8330cc22afec67d9dbc2ad8b4a39eaf62fdf16d1 (diff) | |
| download | rneovim-924f1173cb120b36df738e02d60c6c864ed1ffac.tar.gz rneovim-924f1173cb120b36df738e02d60c6c864ed1ffac.tar.bz2 rneovim-924f1173cb120b36df738e02d60c6c864ed1ffac.zip | |
vim-patch:8.1.0865: when 'listchars' only contains "nbsp:X" it does not work
Problem: When 'listchars' only contains "nbsp:X" it does not work.
Solution: Set extra_check when lcs_nbsp is set. (Ralf Schandl, closes vim/vim#3889)
https://github.com/vim/vim/commit/895d966e341c187ffcf9da88dba193cbfcebf000
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_listchars.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listchars.vim b/src/nvim/testdir/test_listchars.vim index 4899f59910..2870f2d4ef 100644 --- a/src/nvim/testdir/test_listchars.vim +++ b/src/nvim/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 |