diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-09 11:15:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-09 11:15:19 +0200 |
| commit | b6ad20602498e260b3c7ede79699d986e96903da (patch) | |
| tree | 13f0554103243f36eaeaae311c25f06ce965f7aa /src/nvim/testdir | |
| parent | 8330cc22afec67d9dbc2ad8b4a39eaf62fdf16d1 (diff) | |
| parent | 98398ff93f239b27b5ab5eff27f49d1d5d6599ad (diff) | |
| download | rneovim-b6ad20602498e260b3c7ede79699d986e96903da.tar.gz rneovim-b6ad20602498e260b3c7ede79699d986e96903da.tar.bz2 rneovim-b6ad20602498e260b3c7ede79699d986e96903da.zip | |
Merge pull request #9987 from janlazo/vim-8.1.0865
vim-patch:8.1.{865,1299}
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_listchars.vim | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listchars.vim b/src/nvim/testdir/test_listchars.vim index 4899f59910..57cfaa298e 100644 --- a/src/nvim/testdir/test_listchars.vim +++ b/src/nvim/testdir/test_listchars.vim @@ -90,6 +90,45 @@ 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('$'))) + + " test extends + normal ggdG + set listchars=extends:Z + set nowrap + set nolist + call append(0, [ repeat('A', &columns + 1) ]) + + let expected = repeat('A', &columns) + + redraw! + call cursor(1, 1) + call assert_equal([expected], ScreenLines(1, &columns)) + + set list + let expected = expected[:-2] . 'Z' + redraw! + call cursor(1, 1) + call assert_equal([expected], ScreenLines(1, &columns)) + enew! set listchars& ff& endfunc |