From 72a5d4d619f84cb79ab195bfc12102bf589cfc16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=93=87=E5=91=9C=E5=93=87=E5=91=9C=E5=91=80=E5=92=A6?= =?UTF-8?q?=E8=80=B6?= Date: Tue, 21 Feb 2023 00:23:49 +0800 Subject: [PATCH] fix(tabs): allow CJK in tab names (#2119) --- zellij-server/src/screen.rs | 2 +- zellij-server/src/tab/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index a91354ee..e2cac0c9 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -1165,7 +1165,7 @@ impl Screen { }, c => { // It only allows printable unicode - if buf.iter().all(|u| matches!(u, 0x20..=0x7E | 0xA0..=0xFF)) { + if buf.iter().all(|u| matches!(u, 0x20..=0x7E | 0x80..=0xFF)) { active_tab.name.push_str(c); } }, diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs index e99794cf..f6cad5ae 100644 --- a/zellij-server/src/tab/mod.rs +++ b/zellij-server/src/tab/mod.rs @@ -2962,7 +2962,7 @@ impl Tab { // It only allows printable unicode, delete and backspace keys. let is_updatable = buf .iter() - .all(|u| matches!(u, 0x20..=0x7E | 0xA0..=0xFF | 0x08 | 0x7F)); + .all(|u| matches!(u, 0x20..=0x7E | 0x80..=0xFF | 0x08 | 0x7F)); if is_updatable { let s = str::from_utf8(&buf).with_context(err_context)?; active_terminal.update_name(s);