Compare commits
5 Commits
9c30066e73
...
475a0a36cb
Author | SHA1 | Date | |
---|---|---|---|
|
475a0a36cb | ||
|
e8392b282c | ||
|
f8afebdfa0 | ||
|
bda9c9ffa6 | ||
|
045a0fab4f |
@ -171,7 +171,9 @@ static uint forcemousemod = ShiftMask;
|
||||
static MouseShortcut mshortcuts[] = {
|
||||
/* mask button function argument release */
|
||||
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
|
||||
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
|
||||
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
|
||||
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
|
||||
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
|
||||
};
|
||||
|
||||
|
26
st.c
26
st.c
@ -1106,27 +1106,17 @@ selscroll(int orig, int n)
|
||||
if (sel.ob.x == -1)
|
||||
return;
|
||||
|
||||
if (BETWEEN(sel.ob.y, orig, term.bot) || BETWEEN(sel.oe.y, orig, term.bot)) {
|
||||
if ((sel.ob.y += n) > term.bot || (sel.oe.y += n) < term.top) {
|
||||
if (BETWEEN(sel.nb.y, orig, term.bot) != BETWEEN(sel.ne.y, orig, term.bot)) {
|
||||
selclear();
|
||||
} else if (BETWEEN(sel.nb.y, orig, term.bot)) {
|
||||
sel.ob.y += n;
|
||||
sel.oe.y += n;
|
||||
if (sel.ob.y < term.top || sel.ob.y > term.bot ||
|
||||
sel.oe.y < term.top || sel.oe.y > term.bot) {
|
||||
selclear();
|
||||
return;
|
||||
}
|
||||
if (sel.type == SEL_RECTANGULAR) {
|
||||
if (sel.ob.y < term.top)
|
||||
sel.ob.y = term.top;
|
||||
if (sel.oe.y > term.bot)
|
||||
sel.oe.y = term.bot;
|
||||
} else {
|
||||
if (sel.ob.y < term.top) {
|
||||
sel.ob.y = term.top;
|
||||
sel.ob.x = 0;
|
||||
}
|
||||
if (sel.oe.y > term.bot) {
|
||||
sel.oe.y = term.bot;
|
||||
sel.oe.x = term.col;
|
||||
}
|
||||
selnormalize();
|
||||
}
|
||||
selnormalize();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user