Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdding scrollwheel support. Thanks Brandon Invergo! - st - [fork] customized b…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 5d39afc9023bc9a692ba6faf590abf9397a890ae
parent 9df1e56142527de1b8917434093d25212dd9da1e
Author: Christoph Lohmann <[email protected]>
Date: Tue, 6 Nov 2012 23:44:37 +0100
Adding scrollwheel support. Thanks Brandon Invergo!
Diffstat:
M st.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -673,6 +673,10 @@ bpress(XEvent *e) {
sel.mode = 1;
sel.ex = sel.bx = x2col(e->xbutton.x);
sel.ey = sel.by = y2row(e->xbutton.y);
+ } else if(e->xbutton.button == Button4) {
+ ttywrite("\031", 1);
+ } else if(e->xbutton.button == Button5) {
+ ttywrite("\005", 1);
}
}
t@@ -1834,8 +1838,8 @@ tputc(char *c, int len) {
}
}
/*
- * STR sequences must be checked before of anything
- * because it can use some control codes as part of the sequence
+ * STR sequences must be checked before anything else
+ * because it can use some control codes as part of the sequence.
*/
if(term.esc & ESC_STR) {
switch(ascii) {
t@@ -1855,6 +1859,7 @@ tputc(char *c, int len) {
}
return;
}
+
/*
* Actions of control codes must be performed as soon they arrive
* because they can be embedded inside a control sequence, and
t@@ -1895,11 +1900,11 @@ tputc(char *c, int len) {
case '\030': /* CAN */
csireset();
return;
- case '\005': /* ENQ (IGNORED) */
- case '\000': /* NUL (IGNORED) */
- case '\021': /* XON (IGNORED) */
- case '\023': /* XOFF (IGNORED) */
- case 0177: /* DEL (IGNORED) */
+ case '\005': /* ENQ (IGNORED) */
+ case '\000': /* NUL (IGNORED) */
+ case '\021': /* XON (IGNORED) */
+ case '\023': /* XOFF (IGNORED) */
+ case 0177: /* DEL (IGNORED) */
return;
}
} else if(term.esc & ESC_START) {
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.