summaryrefslogtreecommitdiff
path: root/sys/src/cmd/samterm
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-04-28 19:32:21 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-04-28 19:32:21 +0200
commite9c9ea4235697b84d0745c3d56b476230bad27bb (patch)
treeb52b62be47cc0c71959cf302f69ff743e92779ed /sys/src/cmd/samterm
parentda689241d0ed5073412b347683acf278f2248683 (diff)
sam: don't make scroll-wheel-up change focus (thanks clsmith)
Diffstat (limited to 'sys/src/cmd/samterm')
-rw-r--r--sys/src/cmd/samterm/main.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/sys/src/cmd/samterm/main.c b/sys/src/cmd/samterm/main.c
index 31ef5efff..b01eb0e03 100644
--- a/sys/src/cmd/samterm/main.c
+++ b/sys/src/cmd/samterm/main.c
@@ -99,21 +99,19 @@ threadmain(int argc, char *argv[])
}
}
}else if(mousep->buttons&(1|8)){
- if(nwhich){
- if(nwhich!=which)
- current(nwhich);
- else if(scr)
- scroll(which, (mousep->buttons&8) ? 4 : 1);
- else{
- t=(Text *)which->user1;
- if(flselect(which)){
- outTsl(Tdclick, t->tag, which->p0);
- t->lock++;
- }else if(t!=&cmd)
- outcmd();
- if(mousep->buttons&1)
- chord = mousep->buttons;
- }
+ if(scr)
+ scroll(which, (mousep->buttons&8) ? 4 : 1);
+ else if(nwhich && nwhich!=which)
+ current(nwhich);
+ else{
+ t=(Text *)which->user1;
+ if(flselect(which)){
+ outTsl(Tdclick, t->tag, which->p0);
+ t->lock++;
+ }else if(t!=&cmd)
+ outcmd();
+ if(mousep->buttons&1)
+ chord = mousep->buttons;
}
}else if((mousep->buttons&2) && which){
if(scr)