Fix tab skip rendering

Replace '\t' with a space in text buffers, as tab skip/stop is handled
 by `alacritty_terminal`.

 Also, sending a tab to the shaper causes issues, as fonts either have
 no tab codepoint, or worse, some do, with the glyph produced being
 anyone's guess. Some may render a tab to some random character like
 '0'.

 Fixes #73.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
This commit is contained in:
Mohammad AlSaleh 2024-01-21 20:46:56 +03:00 committed by Jeremy Soller
parent 6d519018a0
commit d6946d40bd

View file

@ -633,7 +633,8 @@ impl Terminal {
buffer.set_redraw(true);
}
if buffer.lines[line_i].set_text(text.clone(), attrs_list.clone()) {
// Tab skip/stop is handled by alacritty_terminal
if buffer.lines[line_i].set_text(text.replace('\t', " "), attrs_list.clone()) {
buffer.set_redraw(true);
}
line_i += 1;