shithub: ham

Download patch

ref: a60e9f279604c56fc4c74054bc01f93f3e6debef
parent: 9c0a6bb7ee2543794594f3a678f58aa4c702c011
author: kvik <[email protected]>
date: Tue Apr 27 09:40:53 EDT 2021

samterm: bump minimum window size, fixes a crash (thanks qwx)

diff -u a/samterm/main.c b/samterm/main.c
--- a/samterm/main.c
+++ b/samterm/main.c
@@ -289,7 +289,7 @@
 	*r = getrect(3, mousectl);
 	if(eqrect(*r, Rect(0,0,0,0)))
 		return 0;
-	if(Dx(*r) < 5 && Dy(*r) < 5)
+	if(Dx(*r) < 8*font->width && Dy(*r) < 2*font->height)
 		*r = inflatepoint(r->min);
 	if(rectclip(r, screen->r) == 0)
 		*r = defaultrect();
--- a/samterm/main.c
+++ b/samterm/main.c
@@ -289,7 +289,7 @@
 	*r = getrect(3, mousectl);
 	if(eqrect(*r, Rect(0,0,0,0)))
 		return 0;
-	if(Dx(*r) < 5 && Dy(*r) < 5)
+	if(Dx(*r) < 8*font->width && Dy(*r) < 2*font->height)
 		*r = inflatepoint(r->min);
 	if(rectclip(r, screen->r) == 0)
 		*r = defaultrect();