[hackers] [st] Fixing bad highlighting on first SNAP_WORD multiline select. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Sat, 01 Jun 2013 12:25:45 +0200

commit 8315dc417982936186837edfac24420d0d0e516e
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Sat Jun 1 12:23:55 2013 +0200

    Fixing bad highlighting on first SNAP_WORD multiline select.

diff --git a/st.c b/st.c
index 2eb007b..3fcf543 100644
--- a/st.c
+++ b/st.c
_AT_@ -780,7 +780,7 @@ getbuttoninfo(XEvent *e) {
         sel.oe.x = x2col(e->xbutton.x);
         sel.oe.y = y2row(e->xbutton.y);
 
- if (sel.ob.y < sel.oe.y
+ if(sel.ob.y < sel.oe.y
                         || (sel.ob.y == sel.oe.y && sel.ob.x < sel.oe.x)) {
                 selsnap(sel.snap, &sel.ob.x, &sel.ob.y, -1);
                 selsnap(sel.snap, &sel.oe.x, &sel.oe.y, +1);
_AT_@ -788,7 +788,6 @@ getbuttoninfo(XEvent *e) {
                 selsnap(sel.snap, &sel.oe.x, &sel.oe.y, -1);
                 selsnap(sel.snap, &sel.ob.x, &sel.ob.y, +1);
         }
-
         selsort();
 
         sel.type = SEL_REGULAR;
_AT_@ -1099,7 +1098,7 @@ brelease(XEvent *e) {
                         selcopy();
                 }
                 sel.mode = 0;
- term.dirty[sel.oe.y] = 1;
+ tsetdirt(sel.nb.y, sel.ne.y);
         }
 }
 
Received on Sat Jun 01 2013 - 12:25:45 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 01 2013 - 12:36:10 CEST