From d11bc4a5bbb04b2ed56fa4e44e7e2ee15b6bc041 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 1 Jan 2022 08:17:24 -0700 Subject: [PATCH] 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 --- termwiz/src/widechar_width.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/termwiz/src/widechar_width.rs b/termwiz/src/widechar_width.rs index 53b46e0b5..01050b2b3 100644 --- a/termwiz/src/widechar_width.rs +++ b/termwiz/src/widechar_width.rs @@ -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; }