summaryrefslogtreecommitdiffstats
path: root/cmd-copy-mode.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-10-06 07:19:32 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-10-06 07:19:32 +0000
commit35ca994ba274a0f3f71e50b0a1aadf275d4441dc (patch)
tree787093f6c1270954b29efa23f76e2ea257d83d6e /cmd-copy-mode.c
parent9400fdac77cff0607f592c969949c7e4feed4913 (diff)
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.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c
index f72f1c1b..fda19efb 100644
--- a/cmd-copy-mode.c
+++ b/cmd-copy-mode.c
@@ -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)
{