raster pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=eb5b39c2619db74240ec4a97274cf37a0eecef0b
commit eb5b39c2619db74240ec4a97274cf37a0eecef0b Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Mon Aug 26 17:41:22 2019 +0100 selection in backbuffer fix try #2 get rid of segv's by trying this again in a different way @fix --- src/bin/termiointernals.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bin/termiointernals.c b/src/bin/termiointernals.c index 322c70f..555c27a 100644 --- a/src/bin/termiointernals.c +++ b/src/bin/termiointernals.c @@ -816,6 +816,7 @@ _trim_sel_word(Termio *sd) if (!cells) return; + if (end >= w) end = w - 1; while (end >= 0 && _to_trim(cells[end].codepoint, EINA_FALSE)) end--; @@ -1361,7 +1362,7 @@ termio_selection_dbl_fix(Termio *sd) ((end_y == start_y) && (end_x >= start_x))) { - if (start_x > 0) + if ((start_x > 0) && (start_x < w)) { if ((cells[start_x].codepoint == 0) && (cells[start_x].att.dblwidth)) @@ -2442,7 +2443,7 @@ termio_internal_render(Termio *sd, tc[x].italic = 0; tc[x].double_width = 0; - if (u && *u != ' ') + if (u && *u != ' ' && *u) { termio_sel_set(sd, EINA_FALSE); u = cp = NULL; @@ -2481,7 +2482,7 @@ termio_internal_render(Termio *sd, blk->w * sd->font.chw, blk->h * sd->font.chh); } - if (u && *u != ' ') + if (u && *u != ' ' && *u) { termio_sel_set(sd, EINA_FALSE); u = cp = NULL; @@ -2508,7 +2509,7 @@ termio_internal_render(Termio *sd, if ((tc[x].double_width) && (tc[x].codepoint == 0) && (ch2 == x - 1)) ch2 = x; - if (u && *u != ' ') + if (u && *u != ' ' && *u) { termio_sel_set(sd, EINA_FALSE); u = cp = NULL; --
