summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-copy-mode.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-10-16 17:55:14 +0000
committernicm <nicm@openbsd.org>2016-10-16 17:55:14 +0000
commit765b9a582c208af75c7304abae7e7e4c757934cb (patch)
treec6ba4d8161097c3d648fe4a1d213628591795591 /usr.bin/tmux/cmd-copy-mode.c
parentUse the err(3) family of functions more consistently. (diff)
downloadwireguard-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-copy-mode.c')
-rw-r--r--usr.bin/tmux/cmd-copy-mode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c
index dcbebcfec2c..6eb470f286d 100644
--- a/usr.bin/tmux/cmd-copy-mode.c
+++ b/usr.bin/tmux/cmd-copy-mode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-copy-mode.c,v 1.29 2016/10/14 22:14:22 nicm Exp $ */
+/* $OpenBSD: cmd-copy-mode.c,v 1.30 2016/10/16 17:55:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -61,7 +61,7 @@ cmd_copy_mode_exec(struct cmd *self, struct cmd_q *cmdq)
struct window_pane *wp = cmdq->state.tflag.wp;
if (args_has(args, 'M')) {
- if ((wp = cmd_mouse_pane(&cmdq->item->mouse, &s, NULL)) == NULL)
+ if ((wp = cmd_mouse_pane(&cmdq->mouse, &s, NULL)) == NULL)
return (CMD_RETURN_NORMAL);
if (c == NULL || c->session != s)
return (CMD_RETURN_NORMAL);
@@ -80,7 +80,7 @@ cmd_copy_mode_exec(struct cmd *self, struct cmd_q *cmdq)
if (args_has(args, 'M')) {
if (wp->mode != NULL && wp->mode != &window_copy_mode)
return (CMD_RETURN_NORMAL);
- window_copy_start_drag(c, &cmdq->item->mouse);
+ window_copy_start_drag(c, &cmdq->mouse);
}
if (wp->mode == &window_copy_mode && args_has(self->args, 'u'))
window_copy_pageup(wp, 0);