From da1b943fccc426bc43caa7e7e51208833b9fce66 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 20 Feb 2022 16:20:33 -0500 Subject: Share a cut buffer between all edit buffers --- input.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'input.c') diff --git a/input.c b/input.c index a74335e..b6c51a2 100644 --- a/input.c +++ b/input.c @@ -89,9 +89,14 @@ enum { #undef X }; +static struct Edit cut; static struct Edit edits[IDCap]; void inputInit(void) { + for (size_t i = 0; i < ARRAY_LEN(edits); ++i) { + edits[i].cut = &cut; + } + struct termios term; int error = tcgetattr(STDOUT_FILENO, &term); if (error) err(EX_OSERR, "tcgetattr"); -- cgit 1.4.1-2-gfad0