summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-04-18 22:44:42 +0200
committerBoris Faure <billiob@gmail.com>2015-04-18 22:44:42 +0200
commit0e18a185fef56caa09527d77ad51b75e32b0fd93 (patch)
tree6e7388555a703069b7fa0c220f278980526b0296 /src
parent688f417814957a0e4db6164a40efcb52ff65bd6c (diff)
correctly handle empty lines when doing selections
Diffstat (limited to 'src')
-rw-r--r--src/bin/termio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index ae4a7da..732de73 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2055,7 +2055,11 @@ termio_selection_get(Evas_Object *obj, int c1x, int c1y, int c2x, int c2y,
2055 w = 0; 2055 w = 0;
2056 last0 = -1; 2056 last0 = -1;
2057 cells = termpty_cellrow_get(sd->pty, y, &w); 2057 cells = termpty_cellrow_get(sd->pty, y, &w);
2058 if (!cells) continue; 2058 if (!cells || !w)
2059 {
2060 if (_sb_add(&sb, "\n", 1) < 0) goto err;
2061 continue;
2062 }
2059 if (w > sd->grid.w) w = sd->grid.w; 2063 if (w > sd->grid.w) w = sd->grid.w;
2060 if (y == c1y && c1x >= w) 2064 if (y == c1y && c1x >= w)
2061 { 2065 {