summaryrefslogtreecommitdiff
path: root/src/testdir/test_listchars.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_listchars.vim')
-rw-r--r--src/testdir/test_listchars.vim20
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