billiob pushed a commit to branch master.
commit abb0ea2a954883d624846e088e04c8bf1f9d5196
Author: Boris Faure <[email protected]>
Date: Tue Aug 27 15:17:25 2013 +0200
fix line selection (triple click). Closes T305
---
src/bin/termio.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/src/bin/termio.c b/src/bin/termio.c
index b6e343f..3dce8ad 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2250,15 +2250,43 @@ _smart_xy_to_cursor(Evas_Object *obj, Evas_Coord x,
Evas_Coord y, int *cx, int *
static void
_sel_line(Evas_Object *obj, int cx __UNUSED__, int cy)
{
+ int y, w = 0;
Termio *sd = evas_object_smart_data_get(obj);
+ Termcell *cells;
+
if (!sd) return;
+ termpty_cellcomp_freeze(sd->pty);
+
sd->cur.sel = 1;
sd->cur.makesel = 0;
sd->cur.sel1.x = 0;
sd->cur.sel1.y = cy;
sd->cur.sel2.x = sd->grid.w - 1;
sd->cur.sel2.y = cy;
+
+ y = cy;
+ for (;;)
+ {
+ cells = termpty_cellrow_get(sd->pty, y - 1, &w);
+ if (!cells || !cells[w-1].att.autowrapped) break;
+
+ y--;
+ }
+ sd->cur.sel1.y = y;
+ y = cy;
+
+ for (;;)
+ {
+ cells = termpty_cellrow_get(sd->pty, y, &w);
+ if (!cells || !cells[w-1].att.autowrapped) break;
+
+ sd->cur.sel2.x = w - 1;
+ y++;
+ }
+ sd->cur.sel2.y = y;
+
+ termpty_cellcomp_thaw(sd->pty);
}
static Eina_Bool
--
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk