shithub: riscv

Download patch

ref: 389f45750535ff61d8f9d65d26ed50df12acc161
parent: 0d1801902dcf1c9d3ed7561f355c0c87b5279b55
author: cinap_lenrek <[email protected]>
date: Sat Jun 15 23:23:41 EDT 2013

paint: limit zoom to 12 steps

--- a/sys/src/cmd/paint.c
+++ b/sys/src/cmd/paint.c
@@ -677,10 +677,12 @@
 				center();
 				break;
 			case '+':
-				setzoom(e.mouse.xy, zoom*2);
+				if(zoom < 0x1000)
+					setzoom(e.mouse.xy, zoom*2);
 				break;
 			case '-':
-				setzoom(e.mouse.xy, zoom/2);
+				if(zoom > 1)
+					setzoom(e.mouse.xy, zoom/2);
 				break;
 			case 'c':
 				if(canvas == nil)