termwiz: sync with upstream wichdechar_width
refs: https://github.com/ridiculousfish/widecharwidth/issues/16 refs: https://github.com/ridiculousfish/widecharwidth/pull/17 closes: https://github.com/wez/wezterm/issues/1469
This commit is contained in:
1 parent
7e8e215dc7
commit
d11bc4a5bb
1 file changed
+7
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* widechar_width.rs, generated on 2021-11-24.
|
||||
* widechar_width.rs, generated on 2022-01-01.
|
||||
* See https://github.com/ridiculousfish/widecharwidth/
|
||||
*
|
||||
* SHA1 file hashes:
|
||||
@@ -369,6 +369,9 @@ const COMBINING_TABLE: &'static [R] = &[
|
||||
(0xE0100, 0xE01EF),
|
||||
];
|
||||
|
||||
/// Width 0 combining letters.
|
||||
const COMBININGLETTERS_TABLE: &'static [R] = &[(0x01160, 0x011FF), (0x0D7B0, 0x0D7FF)];
|
||||
|
||||
/// Width 2 characters.
|
||||
const DOUBLEWIDE_TABLE: &'static [R] = &[
|
||||
(0x01100, 0x0115F),
|
||||
@@ -1465,6 +1468,9 @@ impl WcWidth {
|
||||
if in_table(&COMBINING_TABLE, c) {
|
||||
return Self::Combining;
|
||||
}
|
||||
if in_table(&COMBININGLETTERS_TABLE, c) {
|
||||
return Self::Combining;
|
||||
}
|
||||
if in_table(&DOUBLEWIDE_TABLE, c) {
|
||||
return Self::Two;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user