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).
This commit is contained in:
har7an 2022-10-20 15:59:12 +00:00 committed by GitHub
parent 348a197eb9
commit d8fcaf8e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}