shithub: vexed

Download patch

ref: e26a76b6ab5d43048920b219edbfabf52266ffe6
parent: fcad039ff1d33401e66bd193e4c8379a1b3a1884
author: phil9 <[email protected]>
date: Mon Feb 19 02:43:38 EST 2024

fix status bar rect

	using x instead of y does not work that well :/

--- a/vexed.c
+++ b/vexed.c
@@ -338,6 +338,12 @@
 }
 
 void
+xdecode(void)
+{
+	showdec(&buf, sel, mctl, kctl);
+}
+
+void
 save(void)
 {
 	if(!modified)
@@ -561,7 +567,7 @@
 		xsnarfascii();
 		break;
 	case Mdecode:
-		showdec(&buf, sel, mctl, kctl);
+		xdecode();
 		break;
 	case Mgoto:
 		xgoto();
@@ -660,7 +666,7 @@
 	int w, x;
 
 	sr = screen->r;
-	statusr = Rect(sr.min.x, sr.min.y, sr.max.x, sr.min.x + Padding + font->height + 1);
+	statusr = Rect(sr.min.x, sr.min.y, sr.max.x, sr.min.y + Padding + font->height + 1);
 	scrollr = insetrect(Rect(sr.min.x, statusr.max.y+1, sr.min.x+Scrollwidth, sr.max.y), 1);
 	sw = stringwidth(font, " ");
 	w = Padding + 6*sw + 2*Spacing + 16*3*sw-sw + 2*Spacing + 16*sw + Padding;
@@ -778,7 +784,7 @@
 		save();
 		break;
 	case '?':
-		showdec(&buf, sel, mctl, kctl);
+		xdecode();
 		break;
 	default:
 		if(isxdigit(k)){