shithub: acme

Download patch

ref: db0b5711977ddcc2d5460479d4526a6d726fabdf
parent: 5bd859efaf555b67c61b4eeda9caa6444e54353d
author: demyxology <spicycoldnoodles@gmail.com>
date: Sun Jan 19 11:45:10 EST 2025

Added flags to set defaults for evil, line numbers, etc.

--- a/acme.c
+++ b/acme.c
@@ -79,6 +79,9 @@
 		if(ncol <= 0)
 			goto Usage;
 		break;
+	case 'e':
+        evilflag = TRUE;
+        break;
 	case 'f':
 		fontnames[0] = ARGF();
 		if(fontnames[0] == nil)
@@ -97,9 +100,12 @@
 		if(loadfile == nil)
 			goto Usage;
 		break;
+	case 'n':
+	   lineflag = TRUE;
+	   break;
 	default:
 	Usage:
-		fprint(2, "usage: acme [-aib] [-c ncol] [-f font] [-F fixedfont] [-l loadfile | file...]\n");
+		fprint(2, "usage: acme [-aibne] [-c ncol] [-f font] [-F fixedfont] [-l loadfile | file...]\n");
 		exits("usage");
 	}ARGEND
 
--- a/dat.h
+++ b/dat.h
@@ -534,6 +534,8 @@
 Text			*typetext;		/* global because Text.close needs to clear it */
 Text			*barttext;		/* shared between mousetask and keyboardthread */
 int			bartflag;
+int         lineflag;
+int         evilflag;
 Window		*activewin;
 Column		*activecol;
 Buffer		snarfbuf;
--- a/wind.c
+++ b/wind.c
@@ -32,6 +32,8 @@
 		incref(w);
 	w->ctlfid = ~0;
 	w->utflastqid = -1;
+	w->showlines = lineflag;
+	w->evil = evilflag;
 	r1 = r;
 	r1.max.y = r1.min.y + font->height;
 	w->tagtop = r;
@@ -87,6 +89,7 @@
 		textsetselect(&w->body, clone->body.q0, clone->body.q1);
 		winsettag(w);
 	}
+
 }
 
 int