Browse Source

Fixing bad highlighting on first SNAP_WORD multiline select.

master
Christoph Lohmann 11 years ago
parent
commit
8315dc4179
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      st.c

+ 2
- 3
st.c View File

@ -780,7 +780,7 @@ getbuttoninfo(XEvent *e) {
sel.oe.x = x2col(e->xbutton.x); sel.oe.x = x2col(e->xbutton.x);
sel.oe.y = y2row(e->xbutton.y); 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)) { || (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.ob.x, &sel.ob.y, -1);
selsnap(sel.snap, &sel.oe.x, &sel.oe.y, +1); selsnap(sel.snap, &sel.oe.x, &sel.oe.y, +1);
@ -788,7 +788,6 @@ getbuttoninfo(XEvent *e) {
selsnap(sel.snap, &sel.oe.x, &sel.oe.y, -1); selsnap(sel.snap, &sel.oe.x, &sel.oe.y, -1);
selsnap(sel.snap, &sel.ob.x, &sel.ob.y, +1); selsnap(sel.snap, &sel.ob.x, &sel.ob.y, +1);
} }
selsort(); selsort();
sel.type = SEL_REGULAR; sel.type = SEL_REGULAR;
@ -1099,7 +1098,7 @@ brelease(XEvent *e) {
selcopy(); selcopy();
} }
sel.mode = 0; sel.mode = 0;
term.dirty[sel.oe.y] = 1;
tsetdirt(sel.nb.y, sel.ne.y);
} }
} }


Loading…
Cancel
Save