summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-copy-mode.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-04-13 10:59:58 +0000
committernicm <nicm@openbsd.org>2020-04-13 10:59:58 +0000
commit040343ae18e7aa6a49c6acf6e4add8a0b76f6fff (patch)
tree8ed8ccb63639c656437cc1539d3d2b96b405d399 /usr.bin/tmux/cmd-copy-mode.c
parentMake struct cmd local to cmd.c and move it out of tmux.h. (diff)
downloadwireguard-openbsd-040343ae18e7aa6a49c6acf6e4add8a0b76f6fff.tar.xz
wireguard-openbsd-040343ae18e7aa6a49c6acf6e4add8a0b76f6fff.zip
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)) {