diff options
author | nicm <nicm> | 2014-08-11 22:39:57 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-08-11 22:39:57 +0000 |
commit | 2b79d366528294b80960f3a7ed0923bfa0bdc89c (patch) | |
tree | 9c54313b474fe4e89f18de3fe034f43e8f44536e | |
parent | 29d20a55b645600feca1b54a13333e598336dad2 (diff) |
No need to repeat other-end more than once, from Juho Pohjala. Also add
it to the commands list while here.
-rw-r--r-- | mode-key.c | 1 | ||||
-rw-r--r-- | window-copy.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -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/window-copy.c b/window-copy.c index 24f94121..cb8ef57f 100644 --- a/window-copy.c +++ b/window-copy.c @@ -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: |