summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-copy-mode.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
commit56530d4d9e327bc4c76b8b02290102a1fadfffb9 (patch)
treec902ce5f812b38436dec697a5fa08bf3615c0ed4 /usr.bin/tmux/cmd-copy-mode.c
parent9947eee19da9830a3c591d7fb4574df8cdd144e6 (diff)
Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).
Diffstat (limited to 'usr.bin/tmux/cmd-copy-mode.c')
-rw-r--r--usr.bin/tmux/cmd-copy-mode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c
index 911fedbbca5..2e9eaa54bf1 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.42 2020/04/13 08:26:27 nicm Exp $ */
+/* $OpenBSD: cmd-copy-mode.c,v 1.43 2020/04/13 10:59:58 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -57,10 +57,12 @@ static enum cmd_retval
cmd_copy_mode_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = cmd_get_args(self);
- struct cmdq_shared *shared = item->shared;
- struct client *c = item->client;
+ struct cmdq_shared *shared = cmdq_get_shared(item);
+ struct cmd_find_state *source = cmdq_get_source(item);
+ struct cmd_find_state *target = cmdq_get_target(item);
+ struct client *c = cmdq_get_client(item);
struct session *s;
- struct window_pane *wp = item->target.wp, *swp;
+ struct window_pane *wp = target->wp, *swp;
if (args_has(args, 'q')) {
window_pane_reset_mode_all(wp);
@@ -80,7 +82,7 @@ cmd_copy_mode_exec(struct cmd *self, struct cmdq_item *item)
}
if (args_has(args, 's'))
- swp = item->source.wp;
+ swp = source->wp;
else
swp = wp;
if (!window_pane_set_mode(wp, swp, &window_copy_mode, NULL, args)) {