1
0
forked from aniani/vim

patch 8.2.1536: cannot get the class of a character; emoji widths are wrong

Problem:    Cannot get the class of a character; emoji widths are wrong in
            some environments.
Solution:   Add charclass(). Update some emoji widths.  Add script to check
            emoji widths.
This commit is contained in:
Bram Moolenaar
2020-08-28 22:24:57 +02:00
parent 08aac3c619
commit 4e4473c927
9 changed files with 91 additions and 8 deletions

View File

@@ -2077,6 +2077,13 @@ func Test_char2nr()
set encoding=utf-8
endfunc
func Test_charclass()
call assert_equal(0, charclass(' '))
call assert_equal(1, charclass('.'))
call assert_equal(2, charclass('x'))
call assert_equal(3, charclass("\u203c"))
endfunc
func Test_eventhandler()
call assert_equal(0, eventhandler())
endfunc