summaryrefslogtreecommitdiffstats
path: root/notify.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-10-28 16:01:10 +0100
committerThomas Adam <thomas@xteddy.org>2022-10-28 16:01:10 +0100
commit9dd1f442c5a7f1d8d480476f11bc62cceab2019a (patch)
tree6c4e845eafd921b59c56dbcdd02135a517d749b2 /notify.c
parentd001a94d7b5a80018871360fa91361f9268d66c3 (diff)
parent8edece2cdb7b4425526bae904506a246edbb6409 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/notify.c b/notify.c
index dd20898c..97919487 100644
--- a/notify.c
+++ b/notify.c
@@ -152,6 +152,8 @@ notify_callback(struct cmdq_item *item, void *data)
control_notify_session_window_changed(ne->session);
if (strcmp(ne->name, "paste-buffer-changed") == 0)
control_notify_paste_buffer_changed(ne->pbname);
+ if (strcmp(ne->name, "paste-buffer-deleted") == 0)
+ control_notify_paste_buffer_deleted(ne->pbname);
notify_insert_hook(item, ne);
@@ -306,10 +308,16 @@ notify_pane(const char *name, struct window_pane *wp)
}
void
-notify_paste_buffer(const char *pbname)
+notify_paste_buffer(const char *pbname, int deleted)
{
struct cmd_find_state fs;
cmd_find_clear_state(&fs, 0);
- notify_add("paste-buffer-changed", &fs, NULL, NULL, NULL, NULL, pbname);
+ if (deleted) {
+ notify_add("paste-buffer-deleted", &fs, NULL, NULL, NULL, NULL,
+ pbname);
+ } else {
+ notify_add("paste-buffer-changed", &fs, NULL, NULL, NULL, NULL,
+ pbname);
+ }
}