diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index 27c4399f..2ea8fc91 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -206,8 +206,8 @@ termpty_text_append(Termpty *ty, const Eina_Unicode *codepoints, int len) } g = _termpty_charset_trans(ty, codepoints[i]); - /* Skip 0-width space */ - if (EINA_UNLIKELY(g == 0x200b)) + /* Skip 0-width space or RTL/LTR marks */ + if (EINA_UNLIKELY(g >= 0x200b && g <= 0x200f)) { continue; } diff --git a/tests/tests.results b/tests/tests.results index 356b5ade..a5e408f0 100644 --- a/tests/tests.results +++ b/tests/tests.results @@ -122,3 +122,8 @@ osc-11-query.sh b762d503e40641ff896dac46391ad7a8 link_detection.sh bbe87a849586e8b922f26ad5d88146dc selection_with_tabs.sh 23557497a8f28ca246048bb2443b3dab selection_empty_lines.sh 7a90d9bfde9e9fb7f067f6c08eac57ff +osc-invalid.sh 0acecbe16bb3b257745787c40affdb90 +title_icon_stack_simple.sh 9231de4459dbb52d0ffab6f33fc386a0 +title_icon_stack_unset.sh d2ebe2295eb036d9612209490f8aa7f9 +title_icon_stack_default.sh d2ebe2295eb036d9612209490f8aa7f9 +zero-width-spaces.sh 4bbf6bbaef5f651d27b7593d82650de9 diff --git a/tests/zero-width-spaces.sh b/tests/zero-width-spaces.sh new file mode 100755 index 00000000..0ff4cf4a --- /dev/null +++ b/tests/zero-width-spaces.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# fill space with E +printf '\033#8' +#set color +printf '\033[46;31;3m' + +# Zero width space +printf 'aa\xe2\x80\x8baa\n' + +# Zero width space non-joiner +printf 'aa\xe2\x80\x8caa\n' + +# Zero width space joiner +printf 'aa\xe2\x80\x8daa\n'