summaryrefslogtreecommitdiffstats
path: root/cmd-copy-mode.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-06 14:14:07 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-06 14:14:07 +0000
commitf881502f84cb5470213ede28f9578acbd551ceaa (patch)
treec911faceb77a885151475e77c373096dc64ee9a6 /cmd-copy-mode.c
parent32291172bf00770c2b5405cf43cac33ed4ec8410 (diff)
Sync OpenBSD patchset 362:
Remove scroll mode which is now redundant, copy mode should be used instead. The = key binding now does nothing.
Diffstat (limited to 'cmd-copy-mode.c')
-rw-r--r--cmd-copy-mode.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c
index 539af9a2..92aafbd9 100644
--- a/cmd-copy-mode.c
+++ b/cmd-copy-mode.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-copy-mode.c,v 1.23 2009-08-20 11:37:46 tcunha Exp $ */
+/* $Id: cmd-copy-mode.c,v 1.24 2009-10-06 14:14:06 tcunha 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)
{