Try this please:
diff --git a/cmd-copy-mode.c b/cmd-copy-mode.c
index f014be8..40584a2 100644
--- a/cmd-copy-mode.c
+++ b/cmd-copy-mode.c
@@ -54,9 +54,11 @@ cmd_copy_mode_exec(struct cmd *self, struct cmd_q *cmdq)
if (cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp) == NULL)
return (CMD_RETURN_ERROR);
- if (window_pane_set_mode(wp, &window_copy_mode) != 0)
- return (CMD_RETURN_NORMAL);
- window_copy_init_from_pane(wp);
+ if (wp->mode != &window_copy_mode) {
+ if (window_pane_set_mode(wp, &window_copy_mode) != 0)
+ return (CMD_RETURN_NORMAL);
+ window_copy_init_from_pane(wp);
+ }
if (wp->mode == &window_copy_mode && args_has(self->args, 'u'))
window_copy_pageup(wp);
On Thu, Mar 28, 2013 at 12:53:54PM +0100, Kenny Ranerup wrote:
> I'm trying to map PageUp key without prefix-key to enter copy mode. I do it
> using:
>
> bind-key -n PageUp copy-mode -u
>
> This works but it has a side effect that when in copy mode, PageUp no longer
> works, i.e. it doesn't scroll up.
> I also tried to explicitly map PageUp in copy-mode (which already defaults to
> page-up) but it has no effect.
>
> I seems like the bind-key -n PageUp mapping overrides the mapping in
> copy-mode which I don't think is intended if I read the documentation right.
>
> I don't know exactly which version I'm running but I pulled the latest from
> git about two weeks ago.
>
> Kenny
>
> ------------------------------------------------------------------------------
> Own the Future-Intel® Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest.
> Compete for recognition, cash, and the chance to get your game
> on Steam. $5K grand prize plus 10 genre and skill prizes.
> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> tmux-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tmux-users
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users