aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhar7an <99636919+har7an@users.noreply.github.com>2022-10-20 15:59:12 +0000
committerGitHub <noreply@github.com>2022-10-20 15:59:12 +0000
commitd8fcaf8e05fd3d59112157e5802ecded4120c0b1 (patch)
tree3d81eeda4c4d78b3496006553779dee65e65d156
parentchangelog: Add PR #1827 (diff)
downloadsl0ppij-d8fcaf8e05fd3d59112157e5802ecded4120c0b1.tar.gz
sl0ppij-d8fcaf8e05fd3d59112157e5802ecded4120c0b1.tar.xz
sl0ppij-d8fcaf8e05fd3d59112157e5802ecded4120c0b1.zip
server/panes/grid: Document dropping 0-width chars
and add a reference to the issue discussing/tracking this (https://github.com/zellij-org/zellij/issues/1538).
-rw-r--r--zellij-server/src/panes/grid.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/zellij-server/src/panes/grid.rs b/zellij-server/src/panes/grid.rs
index 1382fc7a..88edb1ef 100644
--- a/zellij-server/src/panes/grid.rs
+++ b/zellij-server/src/panes/grid.rs
@@ -1193,6 +1193,10 @@ impl Grid {
}
pub fn add_character(&mut self, terminal_character: TerminalCharacter) {
let character_width = terminal_character.width;
+ // Drop zero-width Unicode/UTF-8 codepoints, like for example Variation Selectors.
+ // This breaks unicode grapheme segmentation, and is the reason why some characters
+ // aren't displayed correctly. Refer to this issue for more information:
+ // https://github.com/zellij-org/zellij/issues/1538
if character_width == 0 {
return;
}