mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
vim-patch:8.2.{1536,1540}: charclass() (#19748)
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.4e4473c927
Use latest charclass() docs from Vim. Rewrite DoIt() in emoji_list.vim in Lua. Omit emoji table updates: - emoji_width update looks wrong as these added ranges are only double-width when followed by 0xFE0F. - Other updates are too old. vim-patch:8.2.1540: the user cannot try out emoji character widths Problem: The user cannot try out emoji character widths. Solution: Move the emoji script to the runtime/tools directory.98945560c1
This commit is contained in:
@@ -1769,6 +1769,13 @@ func Test_char2nr()
|
||||
call assert_equal(12354, char2nr('あ', 1))
|
||||
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