summaryrefslogtreecommitdiffstats
path: root/cmd-copy-mode.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-18 16:21:04 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-18 16:21:04 +0000
commit145ba777e8ad6cca977e6b310de15145e4f1c321 (patch)
tree5135b142d33aedcb18844e25bd38692684f873f2 /cmd-copy-mode.c
parentdc6271cd79947c020fc21a9d5641de6d576f61f2 (diff)
Now that pane targets (-t) are supported, switch some commands to use them
where it makes sense: clock-mode, copy-mode, scroll-mode, send-keys, send-prefix.
Diffstat (limited to 'cmd-copy-mode.c')
-rw-r--r--cmd-copy-mode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c
index 3e6b2228..f72f1c1b 100644
--- a/cmd-copy-mode.c
+++ b/cmd-copy-mode.c
@@ -28,7 +28,7 @@ int cmd_copy_mode_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_copy_mode_entry = {
"copy-mode", NULL,
- "[-u] " CMD_TARGET_WINDOW_USAGE,
+ "[-u] " CMD_TARGET_PANE_USAGE,
0, CMD_CHFLAG('u'),
cmd_target_init,
cmd_target_parse,
@@ -41,12 +41,10 @@ int
cmd_copy_mode_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_target_data *data = self->data;
- struct winlink *wl;
struct window_pane *wp;
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
return (-1);
- wp = wl->window->active;
window_pane_set_mode(wp, &window_copy_mode);
if (wp->mode == &window_copy_mode && data->chflags & CMD_CHFLAG('u'))