mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user