=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-copy-mode.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/tmux/cmd-copy-mode.c 2009/07/26 12:58:44 1.5 +++ src/usr.bin/tmux/cmd-copy-mode.c 2009/08/18 16:21:04 1.6 @@ -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 @@ -28,7 +28,7 @@ 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 @@ 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'))