summaryrefslogtreecommitdiffstats
path: root/cmd-copy-mode.c
diff options
context:
space:
mode:
authornicm <nicm>2016-10-16 17:55:14 +0000
committernicm <nicm>2016-10-16 17:55:14 +0000
commitddc4512d2e0eda6c705e002cb5dbf80719d709e1 (patch)
treecd9ff99f4b1ccb3e76ab99633d59772ae07c3092 /cmd-copy-mode.c
parentbfe14b531267f3762a518f98b72a3148a134396a (diff)
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 'cmd-copy-mode.c')
-rw-r--r--cmd-copy-mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c
index 4591a37d..dc880d56 100644
--- a/cmd-copy-mode.c
+++ b/cmd-copy-mode.c
@@ -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);