summaryrefslogtreecommitdiff
path: root/sys/src/cmd/acme/acme.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-08-03 21:51:25 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-08-03 21:51:25 +0200
commit053a6526e28c9676c4c677e9d2bb654b0352d3a8 (patch)
tree6dcd3ce113b68f59c636abe452f2fab2bbc74974 /sys/src/cmd/acme/acme.c
parent57362e0c8c3b75cae8f3bc2735ffc6e30e19fe03 (diff)
acme: reverting scroll change, causes continuous scrolling with scrollwheel
Diffstat (limited to 'sys/src/cmd/acme/acme.c')
-rw-r--r--sys/src/cmd/acme/acme.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/src/cmd/acme/acme.c b/sys/src/cmd/acme/acme.c
index 96a7d6b03..e874d3554 100644
--- a/sys/src/cmd/acme/acme.c
+++ b/sys/src/cmd/acme/acme.c
@@ -513,13 +513,8 @@ mousethread(void *)
but = 2;
else if(m.buttons == 4)
but = 3;
- else if(m.buttons == 8)
- but = 4;
- else if(m.buttons == 16)
- but = 5;
barttext = t;
- if(t->what==Body && w != nil
- && (ptinrect(m.xy, t->scrollr) || (m.buttons & (8|16)))){
+ if(t->what==Body && ptinrect(m.xy, t->scrollr)){
if(but){
winlock(w, 'M');
t->eq0 = ~0;
@@ -528,6 +523,18 @@ mousethread(void *)
}
goto Continue;
}
+ /* scroll buttons, wheels, etc. */
+ if(t->what==Body && w != nil && (m.buttons & (8|16))){
+ if(m.buttons & 8)
+ but = Kscrolloneup;
+ else
+ but = Kscrollonedown;
+ winlock(w, 'M');
+ t->eq0 = ~0;
+ texttype(t, but);
+ winunlock(w);
+ goto Continue;
+ }
if(ptinrect(m.xy, t->scrollr)){
if(but){
if(t->what == Columntag)