summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_utf8.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_utf8.vim')
-rw-r--r--src/testdir/test_utf8.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim
index 112b5a6e98..deb96ea4b0 100644
--- a/src/testdir/test_utf8.vim
+++ b/src/testdir/test_utf8.vim
@@ -170,6 +170,7 @@ func Test_screenchar_utf8()
endfunc
func Test_setcellwidths()
+ new
call setcellwidths([
\ [0x1330, 0x1330, 2],
\ [9999, 10000, 1],
@@ -212,6 +213,18 @@ func Test_setcellwidths()
" Ambiguous width chars
call assert_equal(2, strwidth("\u00A1"))
call assert_equal(2, strwidth("\u2010"))
+
+ call setcellwidths([])
+ call setline(1, repeat("\u2103", 10))
+ normal! $
+ redraw
+ call assert_equal((aw == 'single') ? 10 : 19, wincol())
+ call setcellwidths([[0x2103, 0x2103, 1]])
+ redraw
+ call assert_equal(10, wincol())
+ call setcellwidths([[0x2103, 0x2103, 2]])
+ redraw
+ call assert_equal(19, wincol())
endfor
set ambiwidth& isprint&
@@ -245,6 +258,7 @@ func Test_setcellwidths()
set listchars&
set fillchars&
call setcellwidths([])
+ bwipe!
endfunc
func Test_getcellwidths()