From 8edece2cdb7b4425526bae904506a246edbb6409 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 28 Oct 2022 13:00:02 +0000 Subject: Add paste-buffer-deleted notification and fix name of paste-buffer-changed. --- control-notify.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'control-notify.c') 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); } } -- cgit