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:
@@ -2425,6 +2425,7 @@ ch_status({handle} [, {options}])
|
||||
String status of channel {handle}
|
||||
changenr() Number current change number
|
||||
char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
chdir({dir}) String change current working directory
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches([{win}]) none clear all matches
|
||||
@@ -3520,6 +3521,18 @@ char2nr({expr} [, {utf8}]) *char2nr()*
|
||||
Can also be used as a |method|: >
|
||||
GetChar()->char2nr()
|
||||
|
||||
|
||||
charclass({string}) *charclass()*
|
||||
Return the character class of the first character in {string}.
|
||||
The character class is one of:
|
||||
0 blank
|
||||
1 punctuation
|
||||
2 word character
|
||||
3 emoji
|
||||
other specific Unicode class
|
||||
The class is used in patterns and word motions.
|
||||
|
||||
|
||||
chdir({dir}) *chdir()*
|
||||
Change the current working directory to {dir}. The scope of
|
||||
the directory change depends on the directory of the current
|
||||
|
||||
@@ -600,6 +600,7 @@ String manipulation: *string-functions*
|
||||
strtrans() translate a string to make it printable
|
||||
tolower() turn a string to lowercase
|
||||
toupper() turn a string to uppercase
|
||||
charclass() class of a character
|
||||
match() position where a pattern matches in a string
|
||||
matchend() position where a pattern match ends in a string
|
||||
matchstr() match of a pattern in a string
|
||||
|
||||
Reference in New Issue
Block a user