From 35ca994ba274a0f3f71e50b0a1aadf275d4441dc Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 6 Oct 2009 07:19:32 +0000 Subject: Remove scroll mode which is now redundant, copy mode should be used instead. The = key binding now does nothing. --- cmd-copy-mode.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'cmd-copy-mode.c') 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) { -- cgit