mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: ignore LTR+RTL markers (U+200E + U+200F)
Foot doesn't implement RTL, and explicit LTR markers is neither needed, nor used in anyway. In fact, they cause issues with font lookup, as fcft often fails to find the marker codepoint in the primary font, causing a fallback font to be used instead. Closes #2049
This commit is contained in:
parent
b2dfd339e4
commit
70b324b24c
2 changed files with 17 additions and 0 deletions
|
|
@ -4156,6 +4156,14 @@ term_process_and_print_non_ascii(struct terminal *term, char32_t wc)
|
|||
(grapheme_clustering ||
|
||||
(!grapheme_clustering && width == 0 && wc >= 0x300)))
|
||||
{
|
||||
if (unlikely(wc == 0x200e || wc == 0x200f)) {
|
||||
/*
|
||||
* Ignore left-to-right and right-to-left markers
|
||||
* see https://codeberg.org/dnkl/foot/issues/2049
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
int col = term->grid->cursor.point.col;
|
||||
if (!term->grid->cursor.lcf)
|
||||
col--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue