shithub: riscv

Download patch

ref: e9c9ea4235697b84d0745c3d56b476230bad27bb
parent: da689241d0ed5073412b347683acf278f2248683
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Apr 28 15:32:21 EDT 2015

sam: don't make scroll-wheel-up change focus (thanks clsmith)

--- a/sys/src/cmd/samterm/main.c
+++ b/sys/src/cmd/samterm/main.c
@@ -99,21 +99,19 @@
 					}
 				}
 			}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)