add -r flag to reverse scrolling behavior.
from peter canning.
This commit is contained in:
parent
5eead98e71
commit
d8c78a8d56
2 changed files with 11 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ char wdir[512] = ".";
|
|||
Reffont *reffonts[2];
|
||||
int snarffd = -1;
|
||||
int mainpid;
|
||||
int swapscrollbuttons = FALSE;
|
||||
|
||||
enum{
|
||||
NSnarf = 1000 /* less than 1024, I/O buffer size */
|
||||
|
|
@ -102,6 +103,9 @@ threadmain(int argc, char *argv[])
|
|||
if(loadfile == nil)
|
||||
goto Usage;
|
||||
break;
|
||||
case 'r':
|
||||
swapscrollbuttons = TRUE;
|
||||
break;
|
||||
case 'W':
|
||||
winsize = ARGF();
|
||||
if(winsize == nil)
|
||||
|
|
@ -562,6 +566,12 @@ mousethread(void *v)
|
|||
barttext = t;
|
||||
if(t->what==Body && ptinrect(m.xy, t->scrollr)){
|
||||
if(but){
|
||||
if(swapscrollbuttons){
|
||||
if(but == 1)
|
||||
but = 3;
|
||||
else if(but == 3)
|
||||
but = 1;
|
||||
}
|
||||
winlock(w, 'M');
|
||||
t->eq0 = ~0;
|
||||
textscroll(t, but);
|
||||
|
|
|
|||
|
|
@ -515,6 +515,7 @@ Text *mousetext; /* global because Text.close needs to clear it */
|
|||
Text *typetext; /* global because Text.close needs to clear it */
|
||||
Text *barttext; /* shared between mousetask and keyboardthread */
|
||||
int bartflag;
|
||||
int swapscrollbuttons;
|
||||
Window *activewin;
|
||||
Column *activecol;
|
||||
Buffer snarfbuf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue