=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/notify.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- src/usr.bin/tmux/notify.c 2022/08/15 09:10:34 1.42 +++ src/usr.bin/tmux/notify.c 2022/10/28 13:00:02 1.43 @@ -1,4 +1,4 @@ -/* $OpenBSD: notify.c,v 1.42 2022/08/15 09:10:34 nicm Exp $ */ +/* $OpenBSD: notify.c,v 1.43 2022/10/28 13:00:02 nicm Exp $ */ /* * Copyright (c) 2012 George Nachman @@ -153,6 +153,8 @@ 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); @@ -307,10 +309,16 @@ } 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); + } }