billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=6cc0abd78770d79e19dd21cd893e31cf429aafca
commit 6cc0abd78770d79e19dd21cd893e31cf429aafca Author: Boris Faure <[email protected]> Date: Sat Nov 26 18:42:26 2016 +0100 termpty: skip combining chars unless it can be used as strikethrough --- src/bin/termpty.h | 1 + src/bin/termptyops.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/bin/termpty.h b/src/bin/termpty.h index 3573dbe..85413e5 100644 --- a/src/bin/termpty.h +++ b/src/bin/termpty.h @@ -151,6 +151,7 @@ struct _Termpty unsigned int no_autorepeat : 1; unsigned int cjk_ambiguous_wide : 1; unsigned int hide_cursor : 1; + unsigned int combining_strike : 1; } termstate; struct { int cx, cy; diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c index 3d035f8..c7a1662 100644 --- a/src/bin/termptyops.c +++ b/src/bin/termptyops.c @@ -176,9 +176,23 @@ termpty_text_append(Termpty *ty, const Eina_Unicode *codepoints, int len) { continue; } + if (EINA_UNLIKELY(g >= 0x300 && g <=0x36f)) + { + /* combining chars */ + if (EINA_UNLIKELY(g == 0x336)) + { + ty->termstate.combining_strike = 1; + } + continue; + } termpty_cell_codepoint_att_fill(ty, g, ty->termstate.att, &(cells[ty->cursor_state.cx]), 1); + if (EINA_UNLIKELY(ty->termstate.combining_strike)) + { + ty->termstate.combining_strike = 0; + cells[ty->cursor_state.cx].att.strike = 1; + } cells[ty->cursor_state.cx].att.dblwidth = _termpty_is_dblwidth_get(ty, g); if (EINA_UNLIKELY((cells[ty->cursor_state.cx].att.dblwidth) && (ty->cursor_state.cx < (ty->w - 1)))) { --
