diff options
author | June McEnroe | 2022-02-20 16:20:33 -0500 |
---|---|---|
committer | June McEnroe | 2022-02-20 16:20:33 -0500 |
commit | da1b943fccc426bc43caa7e7e51208833b9fce66 (patch) | |
tree | 470f1248afb330b03e1090d953b1e49f4f736d3c /input.c | |
parent | c8b6e331de95419de72546964f6b255dccddcd93 (diff) |
Share a cut buffer between all edit buffers
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 5 |
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"); |