=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/notify.c,v retrieving revision 1.34 retrieving revision 1.35 diff -c -r1.34 -r1.35 *** src/usr.bin/tmux/notify.c 2020/04/13 15:55:51 1.34 --- src/usr.bin/tmux/notify.c 2020/04/14 06:00:52 1.35 *************** *** 1,4 **** ! /* $OpenBSD: notify.c,v 1.34 2020/04/13 15:55:51 nicm Exp $ */ /* * Copyright (c) 2012 George Nachman --- 1,4 ---- ! /* $OpenBSD: notify.c,v 1.35 2020/04/14 06:00:52 nicm Exp $ */ /* * Copyright (c) 2012 George Nachman *************** *** 158,165 **** struct session *s, struct window *w, struct window_pane *wp) { struct notify_entry *ne; ! struct cmdq_item *new_item; ne = xcalloc(1, sizeof *ne); ne->name = xstrdup(name); --- 158,169 ---- struct session *s, struct window *w, struct window_pane *wp) { struct notify_entry *ne; ! struct cmdq_item *item; + item = cmdq_running(NULL); + if (item != NULL && (cmdq_get_flags(item) & CMDQ_STATE_NOHOOKS)) + return; + ne = xcalloc(1, sizeof *ne); ne->name = xstrdup(name); *************** *** 183,190 **** if (ne->fs.s != NULL) /* cmd_find_valid_state needs session */ session_add_ref(ne->fs.s, __func__); ! new_item = cmdq_get_callback(notify_callback, ne); ! cmdq_append(NULL, new_item); } void --- 187,193 ---- if (ne->fs.s != NULL) /* cmd_find_valid_state needs session */ session_add_ref(ne->fs.s, __func__); ! cmdq_append(NULL, cmdq_get_callback(notify_callback, ne)); } void