summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-04-18 23:12:39 +0200
committerBoris Faure <billiob@gmail.com>2015-04-18 23:12:39 +0200
commitc2b26e099965317c87665e4ebcde238001744c85 (patch)
treeb13ce035625ad6f12564f8198fd6fa643bb788bc /src
parent0e18a185fef56caa09527d77ad51b75e32b0fd93 (diff)
fix selecting tabs
Diffstat (limited to 'src')
-rw-r--r--src/bin/termio.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 732de73..634813d 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2090,11 +2090,7 @@ termio_selection_get(Evas_Object *obj, int c1x, int c1y, int c2x, int c2y,
2090 } 2090 }
2091#endif 2091#endif
2092 if (x >= w) break; 2092 if (x >= w) break;
2093 if (cells[x].codepoint == 0) 2093 if (cells[x].att.newline)
2094 {
2095 if (last0 < 0) last0 = x;
2096 }
2097 else if (cells[x].att.newline)
2098 { 2094 {
2099 last0 = -1; 2095 last0 = -1;
2100 if ((y != c2y) || (x != end_x)) 2096 if ((y != c2y) || (x != end_x))
@@ -2109,7 +2105,11 @@ termio_selection_get(Evas_Object *obj, int c1x, int c1y, int c2x, int c2y,
2109 { 2105 {
2110 if (_sb_add(&sb, "\t", 1) < 0) goto err; 2106 if (_sb_add(&sb, "\t", 1) < 0) goto err;
2111 x = ((x + 8) / 8) * 8; 2107 x = ((x + 8) / 8) * 8;
2112 x--; 2108 x--; /* counter the ++ of the for loop */
2109 }
2110 else if (cells[x].codepoint == 0)
2111 {
2112 if (last0 < 0) last0 = x;
2113 } 2113 }
2114 else 2114 else
2115 { 2115 {
@@ -2332,6 +2332,7 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type)
2332 sb = eina_strbuf_new(); 2332 sb = eina_strbuf_new();
2333 for (i = start_y; i <= end_y; i++) 2333 for (i = start_y; i <= end_y; i++)
2334 { 2334 {
2335 /* TODO: use our own strbuf implementation */
2335 char *tmp = termio_selection_get(obj, start_x, i, end_x, i, 2336 char *tmp = termio_selection_get(obj, start_x, i, end_x, i,
2336 &len, EINA_TRUE); 2337 &len, EINA_TRUE);
2337 2338