summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-copy-mode.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-10-06 07:19:33 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-10-06 07:19:33 +0000
commitfc5fe287d72776b43ec481a0cf9804a63b570ba0 (patch)
tree0d5f6de5225da0b306026e3690cf9887fb019d9c /usr.bin/tmux/cmd-copy-mode.c
parentd5a448bb3f07df7581aec4fb1f4ae1d580940f9b (diff)
Remove scroll mode which is now redundant, copy mode should be used instead.
The = key binding now does nothing.
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)
{