summaryrefslogtreecommitdiffstats
path: root/control-notify.c
diff options
context:
space:
mode:
authornicm <nicm>2022-10-28 13:00:02 +0000
committernicm <nicm>2022-10-28 13:00:02 +0000
commit8edece2cdb7b4425526bae904506a246edbb6409 (patch)
treedeaaac60c890b8fd4e26913c21fcbfcf54c07508 /control-notify.c
parentc2580cfe2466589c8bd9348225820888a3fc4c0a (diff)
Add paste-buffer-deleted notification and fix name of paste-buffer-changed.
Diffstat (limited to 'control-notify.c')
-rw-r--r--control-notify.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/control-notify.c b/control-notify.c
index a252dd05..30f94194 100644
--- a/control-notify.c
+++ b/control-notify.c
@@ -244,6 +244,19 @@ control_notify_paste_buffer_changed(const char *name)
if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
continue;
- control_write(c, "%%paste-changed %s", name);
+ control_write(c, "%%paste-buffer-changed %s", name);
+ }
+}
+
+void
+control_notify_paste_buffer_deleted(const char *name)
+{
+ struct client *c;
+
+ TAILQ_FOREACH(c, &clients, entry) {
+ if (!CONTROL_SHOULD_NOTIFY_CLIENT(c))
+ continue;
+
+ control_write(c, "%%paste-buffer-deleted %s", name);
}
}