diff options
author | 2009-08-18 16:21:04 +0000 | |
---|---|---|
committer | 2009-08-18 16:21:04 +0000 | |
commit | ba61d28884bd7b47378b630bb01048500424a65c (patch) | |
tree | 5bc2646cd55f0a79f8964fe1de30fe186938cfd8 /usr.bin/tmux/cmd-copy-mode.c | |
parent | Tag a few missed printf-like functions and fix a missing "%s". (diff) | |
download | wireguard-openbsd-ba61d28884bd7b47378b630bb01048500424a65c.tar.xz wireguard-openbsd-ba61d28884bd7b47378b630bb01048500424a65c.zip |
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 'usr.bin/tmux/cmd-copy-mode.c')
-rw-r--r-- | usr.bin/tmux/cmd-copy-mode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c index 6e9a1f3ddd7..90cbc5b1699 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.5 2009/07/26 12:58:44 nicm Exp $ */ +/* $OpenBSD: cmd-copy-mode.c,v 1.6 2009/08/18 16:21:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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')) |