mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
754892e59d
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
22 lines
388 B
VimL
22 lines
388 B
VimL
" Script to fill the window with emoji characters, one per line.
|
|
" Source this script: :source %
|
|
|
|
if &modified
|
|
new
|
|
else
|
|
enew
|
|
endif
|
|
|
|
lua << EOF
|
|
local lnum = 1
|
|
for c = 0x100, 0x1ffff do
|
|
local cs = vim.fn.nr2char(c)
|
|
if vim.fn.charclass(cs) == 3 then
|
|
vim.fn.setline(lnum, '|' .. cs .. '| ' .. vim.fn.strwidth(cs))
|
|
lnum = lnum + 1
|
|
end
|
|
end
|
|
EOF
|
|
|
|
set nomodified
|