summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author哇呜哇呜呀咦耶 <pingao777@gmail.com>2023-02-21 00:23:49 +0800
committerGitHub <noreply@github.com>2023-02-20 17:23:49 +0100
commit72a5d4d619f84cb79ab195bfc12102bf589cfc16 (patch)
tree27d8b76ecb8da1e26eae4307d72d0619d27f1713
parent99639be1c926db3a44e2c2c1cbc8054b32296f01 (diff)
fix(tabs): allow CJK in tab names (#2119)
-rw-r--r--zellij-server/src/screen.rs2
-rw-r--r--zellij-server/src/tab/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index a91354ee3..e2cac0c91 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 e99794cf1..f6cad5aea 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);