From 8918bd598190b8c467746524f1886cc40be0b617 Mon Sep 17 00:00:00 2001 From: kvik Date: Sun, 31 May 2020 22:39:46 +0200 Subject: acme: implement 'scratch' ctl command (thanks Drew DeVault) The new command marks the target window as a scratch window -- a window whose state cannot be "dirtied" by changes made to its body, therefore avoiding warnings about unsaved changes when deleting the window or exiting acme. Existing examples of scratch windows are error, directory, and guide windows, whose scratchness is set internally. With the new command users and programs alike can create their own scratch windows. This is put to use in acme's own win(1). --- acme/bin/source/win/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'acme/bin/source') diff --git a/acme/bin/source/win/main.c b/acme/bin/source/win/main.c index b8a4aa3c4..ebdb31f5f 100644 --- a/acme/bin/source/win/main.c +++ b/acme/bin/source/win/main.c @@ -64,6 +64,7 @@ threadmain(int argc, char *argv[]) wintagwrite(win, "Send Noscroll", 5+8); ctlprint(win->ctl, "scroll"); + ctlprint(win->ctl, "scratch"); snprint(buf, sizeof(buf), "/proc/%d/notepg", getpid()); notepg = open(buf, OWRITE); -- cgit v1.2.3