diff options
author | 2020-03-20 17:59:39 +0000 | |
---|---|---|
committer | 2020-03-20 17:59:39 +0000 | |
commit | 37821860e5f156e38ca88fef35c5d148b52be3c9 (patch) | |
tree | 567399eb3dc1fd641316750cdcb1397f6ea71b90 /usr.bin/tmux/cmd-copy-mode.c | |
parent | The i.MX8MQ 32K clock is always on. (diff) | |
download | wireguard-openbsd-37821860e5f156e38ca88fef35c5d148b52be3c9.tar.xz wireguard-openbsd-37821860e5f156e38ca88fef35c5d148b52be3c9.zip |
Make the mouse_word and mouse_line formats work in copy mode and enable
the default pane menu in copy mode.
Diffstat (limited to 'usr.bin/tmux/cmd-copy-mode.c')
-rw-r--r-- | usr.bin/tmux/cmd-copy-mode.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c index 22dd9bd731d..8ff428c0cba 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.39 2020/03/12 13:19:20 nicm Exp $ */ +/* $OpenBSD: cmd-copy-mode.c,v 1.40 2020/03/20 17:59:39 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 = { "eHMt:u", 0, 0 }, - .usage = "[-eHMu] " CMD_TARGET_PANE_USAGE, + .args = { "eHMt:uq", 0, 0 }, + .usage = "[-eHMuq] " CMD_TARGET_PANE_USAGE, .target = { 't', CMD_FIND_PANE, 0 }, @@ -61,6 +61,11 @@ cmd_copy_mode_exec(struct cmd *self, struct cmdq_item *item) struct session *s; struct window_pane *wp = item->target.wp; + if (args_has(args, 'q')) { + window_pane_reset_mode_all(wp); + return (CMD_RETURN_NORMAL); + } + if (args_has(args, 'M')) { if ((wp = cmd_mouse_pane(&shared->mouse, &s, NULL)) == NULL) return (CMD_RETURN_NORMAL); |