about summary refs log tree commit diff
path: root/input.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-02-20 16:20:33 -0500
committerJune McEnroe <june@causal.agency>2022-02-20 16:20:33 -0500
commitda1b943fccc426bc43caa7e7e51208833b9fce66 (patch)
tree470f1248afb330b03e1090d953b1e49f4f736d3c /input.c
parentAssert return values in edit tests (diff)
downloadcatgirl-da1b943fccc426bc43caa7e7e51208833b9fce66.tar.gz
catgirl-da1b943fccc426bc43caa7e7e51208833b9fce66.zip
Share a cut buffer between all edit buffers
Diffstat (limited to '')
-rw-r--r--input.c5
1 files changed, 5 insertions, 0 deletions
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");