shithub: riscv

Download patch

ref: 98b9c4eb1ef0907ee596cc2ddd19beb03427a062
parent: 6023250c468b1ee4baafa0562cc2215f939a0c28
author: cinap_lenrek <[email protected]>
date: Thu Jul 26 13:28:14 EDT 2012

rio: dont shift window out to the left when its too wide for the screen

--- a/sys/src/cmd/rio/wctl.c
+++ b/sys/src/cmd/rio/wctl.c
@@ -153,13 +153,13 @@
 void
 shift(int *minp, int *maxp, int min, int max)
 {
-	if(*minp < min){
-		*maxp += min-*minp;
-		*minp = min;
-	}
 	if(*maxp > max){
 		*minp += max-*maxp;
 		*maxp = max;
+	}
+	if(*minp < min){
+		*maxp += min-*minp;
+		*minp = min;
 	}
 }