diff options
author | 2016-10-16 17:55:14 +0000 | |
---|---|---|
committer | 2016-10-16 17:55:14 +0000 | |
commit | 765b9a582c208af75c7304abae7e7e4c757934cb (patch) | |
tree | c6ba4d8161097c3d648fe4a1d213628591795591 /usr.bin/tmux/cmd-split-window.c | |
parent | Use the err(3) family of functions more consistently. (diff) | |
download | wireguard-openbsd-765b9a582c208af75c7304abae7e7e4c757934cb.tar.xz wireguard-openbsd-765b9a582c208af75c7304abae7e7e4c757934cb.zip |
Rewrite command queue handling. Each client still has a command queue,
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.
This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.
A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-split-window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index f42e6428ead..db453271150 100644 --- a/usr.bin/tmux/cmd-split-window.c +++ b/usr.bin/tmux/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-split-window.c,v 1.73 2016/10/13 22:48:51 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.74 2016/10/16 17:55:14 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -188,8 +188,8 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq) fs.w = w; fs.wp = new_wp; cmd_find_log_state(__func__, &fs); - if (hooks_wait(s->hooks, cmdq, &fs, "after-split-window") == 0) - return (CMD_RETURN_WAIT); + hooks_insert(s->hooks, cmdq, &fs, "after-split-window"); + return (CMD_RETURN_NORMAL); error: |