summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-copy-mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-copy-mode.c')
-rw-r--r--usr.bin/tmux/cmd-copy-mode.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c
index 90cbc5b1699..2795dcf8649 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.6 2009/08/18 16:21:04 nicm Exp $ */
+/* $OpenBSD: cmd-copy-mode.c,v 1.7 2009/10/06 07:19:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -24,19 +24,35 @@
* Enter copy mode.
*/
+void cmd_copy_mode_init(struct cmd *, int);
int cmd_copy_mode_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_copy_mode_entry = {
"copy-mode", NULL,
"[-u] " CMD_TARGET_PANE_USAGE,
0, CMD_CHFLAG('u'),
- cmd_target_init,
+ cmd_copy_mode_init,
cmd_target_parse,
cmd_copy_mode_exec,
cmd_target_free,
NULL
};
+void
+cmd_copy_mode_init(struct cmd *self, int key)
+{
+ struct cmd_target_data *data;
+
+ cmd_target_init(self, key);
+ data = self->data;
+
+ switch (key) {
+ case KEYC_PPAGE:
+ data->chflags |= CMD_CHFLAG('u');
+ break;
+ }
+}
+
int
cmd_copy_mode_exec(struct cmd *self, struct cmd_ctx *ctx)
{