From 45583dba65facb4a2a0a008a174bd0a2cdf56119 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 13 Jul 2012 06:27:41 +0000 Subject: Add a queue of notifys and a way to turn them off and on (we do not want notifys to happen during some commands). Based on code from George Nachman. --- usr.bin/tmux/cmd-list.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux/cmd-list.c') diff --git a/usr.bin/tmux/cmd-list.c b/usr.bin/tmux/cmd-list.c index 32e94c4d170..4629702c29b 100644 --- a/usr.bin/tmux/cmd-list.c +++ b/usr.bin/tmux/cmd-list.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list.c,v 1.9 2012/07/11 07:10:15 nicm Exp $ */ +/* $OpenBSD: cmd-list.c,v 1.10 2012/07/13 06:27:41 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -91,6 +91,8 @@ cmd_list_exec(struct cmd_list *cmdlist, struct cmd_ctx *ctx) if (c != NULL && c->session != NULL) guards = c->flags & CLIENT_CONTROL; + notify_disable(); + retval = 0; TAILQ_FOREACH(cmd, &cmdlist->list, qentry) { if (guards) @@ -128,6 +130,8 @@ cmd_list_exec(struct cmd_list *cmdlist, struct cmd_ctx *ctx) break; } } + + notify_enable(); return (retval); } -- cgit v1.2.3-59-g8ed1b