diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-28 22:24:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-28 22:24:57 +0200 |
commit | 4e4473c927167fd24e5c8df90e0e8035080cf2da (patch) | |
tree | 07e43fbf7948fd3dbd6878b6c5c29069124a4c43 /runtime | |
parent | 08aac3c6192f0103cb87e280270a32b50e653be1 (diff) |
patch 8.2.1536: cannot get the class of a character; emoji widths are wrongv8.2.1536
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.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 13 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 129c1e2e2c..e0c8473038 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -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 diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index bcd58c9fec..10e53baf72 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -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 |