shithub: orca

Download patch

ref: c593c3b2d5009c798486cdd3745ff0e160aeeeb6
parent: 2654c713aafb1999e00ace3bce4e078168bfb38b
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Feb 15 06:31:41 EST 2020

plan9: snap initial field size to grid

--- a/plan9.c
+++ b/plan9.c
@@ -564,8 +564,8 @@
 static void
 screensize(int *w, int *h)
 {
-	*w = (Dx(screen->r) - 2*Txtoff) / charw;
-	*h = ((Dy(screen->r) - 2*Txtoff) - 3*charh) / charh;
+	*w = snaplow((Dx(screen->r) - 2*Txtoff) / charw, gridw);
+	*h = snaplow(((Dy(screen->r) - 2*Txtoff) - 3*charh) / charh, gridh);
 }
 
 static void