summaryrefslogtreecommitdiff
path: root/src/bin/termiointernals.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/termiointernals.c')
-rw-r--r--src/bin/termiointernals.c9
1 files 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)
816 if (!cells) 816 if (!cells)
817 return; 817 return;
818 818
819 if (end >= w) end = w - 1;
819 while (end >= 0 && _to_trim(cells[end].codepoint, EINA_FALSE)) 820 while (end >= 0 && _to_trim(cells[end].codepoint, EINA_FALSE))
820 end--; 821 end--;
821 822
@@ -1361,7 +1362,7 @@ termio_selection_dbl_fix(Termio *sd)
1361 ((end_y == start_y) && 1362 ((end_y == start_y) &&
1362 (end_x >= start_x))) 1363 (end_x >= start_x)))
1363 { 1364 {
1364 if (start_x > 0) 1365 if ((start_x > 0) && (start_x < w))
1365 { 1366 {
1366 if ((cells[start_x].codepoint == 0) && 1367 if ((cells[start_x].codepoint == 0) &&
1367 (cells[start_x].att.dblwidth)) 1368 (cells[start_x].att.dblwidth))
@@ -2442,7 +2443,7 @@ termio_internal_render(Termio *sd,
2442 tc[x].italic = 0; 2443 tc[x].italic = 0;
2443 tc[x].double_width = 0; 2444 tc[x].double_width = 0;
2444 2445
2445 if (u && *u != ' ') 2446 if (u && *u != ' ' && *u)
2446 { 2447 {
2447 termio_sel_set(sd, EINA_FALSE); 2448 termio_sel_set(sd, EINA_FALSE);
2448 u = cp = NULL; 2449 u = cp = NULL;
@@ -2481,7 +2482,7 @@ termio_internal_render(Termio *sd,
2481 blk->w * sd->font.chw, 2482 blk->w * sd->font.chw,
2482 blk->h * sd->font.chh); 2483 blk->h * sd->font.chh);
2483 } 2484 }
2484 if (u && *u != ' ') 2485 if (u && *u != ' ' && *u)
2485 { 2486 {
2486 termio_sel_set(sd, EINA_FALSE); 2487 termio_sel_set(sd, EINA_FALSE);
2487 u = cp = NULL; 2488 u = cp = NULL;
@@ -2508,7 +2509,7 @@ termio_internal_render(Termio *sd,
2508 if ((tc[x].double_width) && (tc[x].codepoint == 0) && 2509 if ((tc[x].double_width) && (tc[x].codepoint == 0) &&
2509 (ch2 == x - 1)) 2510 (ch2 == x - 1))
2510 ch2 = x; 2511 ch2 = x;
2511 if (u && *u != ' ') 2512 if (u && *u != ' ' && *u)
2512 { 2513 {
2513 termio_sel_set(sd, EINA_FALSE); 2514 termio_sel_set(sd, EINA_FALSE);
2514 u = cp = NULL; 2515 u = cp = NULL;