summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-copy-mode.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-08-26 07:09:35 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-08-26 07:09:35 +0000
commit5ba59de62f3f1bbd38a64db53f9cedcec6e81547 (patch)
tree74de634ca7c390122b7529e2fd2cde087e11048c /usr.bin/tmux/cmd-copy-mode.c
parentaf76e063adb93dcf845ffd2c1d2fd5f135dfbe97 (diff)
Add copy-mode -d flag to scroll a page down if in copy mode already,
from Michael Grant.
Diffstat (limited to 'usr.bin/tmux/cmd-copy-mode.c')
-rw-r--r--usr.bin/tmux/cmd-copy-mode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c
index 84b7521c74c..a9110cf87cb 100644
--- a/usr.bin/tmux/cmd-copy-mode.c
+++ b/usr.bin/tmux/cmd-copy-mode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-copy-mode.c,v 1.47 2021/08/21 10:22:38 nicm Exp $ */
+/* $OpenBSD: cmd-copy-mode.c,v 1.48 2024/08/26 07:09:34 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -30,8 +30,8 @@ const struct cmd_entry cmd_copy_mode_entry = {
.name = "copy-mode",
.alias = NULL,
- .args = { "eHMs:t:uq", 0, 0, NULL },
- .usage = "[-eHMuq] [-s src-pane] " CMD_TARGET_PANE_USAGE,
+ .args = { "deHMs:t:uq", 0, 0, NULL },
+ .usage = "[-deHMuq] [-s src-pane] " CMD_TARGET_PANE_USAGE,
.source = { 's', CMD_FIND_PANE, 0 },
.target = { 't', CMD_FIND_PANE, 0 },
@@ -91,6 +91,8 @@ cmd_copy_mode_exec(struct cmd *self, struct cmdq_item *item)
}
if (args_has(args, 'u'))
window_copy_pageup(wp, 0);
+ if (args_has(args, 'd'))
+ window_copy_pagedown(wp, 0, args_has(args, 'e'));
return (CMD_RETURN_NORMAL);
}