From: nicm Date: Mon, 11 Aug 2014 22:39:57 +0000 (+0000) Subject: No need to repeat other-end more than once, from Juho Pohjala. Also add X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=503c9848e61cdf690b067f7de3ec44c9054fd073;p=openbsd No need to repeat other-end more than once, from Juho Pohjala. Also add it to the commands list while here. --- diff --git a/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c index f4d3c89016a..75a832520c5 100644 --- a/usr.bin/tmux/mode-key.c +++ b/usr.bin/tmux/mode-key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mode-key.c,v 1.59 2014/05/13 07:54:20 nicm Exp $ */ +/* $OpenBSD: mode-key.c,v 1.60 2014/08/11 22:39:57 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -130,6 +130,7 @@ const struct mode_key_cmdstr mode_key_cmdstr_copy[] = { { MODEKEYCOPY_NEXTSPACEEND, "next-space-end" }, { MODEKEYCOPY_NEXTWORD, "next-word" }, { MODEKEYCOPY_NEXTWORDEND, "next-word-end" }, + { MODEKEYCOPY_OTHEREND, "other-end" }, { MODEKEYCOPY_PREVIOUSPAGE, "page-up" }, { MODEKEYCOPY_PREVIOUSSPACE, "previous-space" }, { MODEKEYCOPY_PREVIOUSWORD, "previous-word" }, diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index a99aace9514..e2bda1d2a4e 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.112 2014/08/11 22:18:16 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.113 2014/08/11 22:39:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -429,7 +429,7 @@ window_copy_key(struct window_pane *wp, struct session *sess, int key) window_pane_reset_mode(wp); return; case MODEKEYCOPY_OTHEREND: - for (; np != 0; np--) + if (np % 2) window_copy_other_end(wp); break; case MODEKEYCOPY_LEFT: