summaryrefslogtreecommitdiff
path: root/sys/src/cmd/acme/acme.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2020-09-22 11:42:15 -0700
committerOri Bernstein <ori@eigenstate.org>2020-09-22 11:42:15 -0700
commit313aebb96478c37be8f39754875c02dcb3f896cc (patch)
tree880c9ba449631562b136135e3e9a7e6169d178f6 /sys/src/cmd/acme/acme.c
parentc1c904776c1536e854c5c1717a104353f885c3cd (diff)
acme: import changes from plan9port (thanks jxy)
Import the following improvements and bugfixes from plan9port: 4650064a acme: scale window bodies on resize, not including tag space d28913a9 acme: save/restore multiline tags in Dump/Load d2df5d6c acme: fix crash in X |cat with multiple windows 3d6e5cb5 acme: preserve window position and selection during Get
Diffstat (limited to 'sys/src/cmd/acme/acme.c')
-rw-r--r--sys/src/cmd/acme/acme.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/sys/src/cmd/acme/acme.c b/sys/src/cmd/acme/acme.c
index e874d3554..96a7d6b03 100644
--- a/sys/src/cmd/acme/acme.c
+++ b/sys/src/cmd/acme/acme.c
@@ -513,8 +513,13 @@ 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 && ptinrect(m.xy, t->scrollr)){
+ if(t->what==Body && w != nil
+ && (ptinrect(m.xy, t->scrollr) || (m.buttons & (8|16)))){
if(but){
winlock(w, 'M');
t->eq0 = ~0;
@@ -523,18 +528,6 @@ 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)