From 7c2dcd72380dc2d9e119e99cb423a67ae17b6bd2 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 15 Aug 2022 09:10:34 +0000 Subject: Notify when a paste buffer is deleted, GitHub issue 3302 from George Nachman. --- control-notify.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'control-notify.c') diff --git a/control-notify.c b/control-notify.c index 6ff0e436..a252dd05 100644 --- a/control-notify.c +++ b/control-notify.c @@ -234,3 +234,16 @@ control_notify_session_window_changed(struct session *s) s->curw->window->id); } } + +void +control_notify_paste_buffer_changed(const char *name) +{ + struct client *c; + + TAILQ_FOREACH(c, &clients, entry) { + if (!CONTROL_SHOULD_NOTIFY_CLIENT(c)) + continue; + + control_write(c, "%%paste-changed %s", name); + } +} -- cgit