summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2024-03-21 11:51:32 +0000
committernicm <nicm>2024-03-21 11:51:32 +0000
commitd8ddeec7db6955434a32acedf7079031c2d8d212 (patch)
tree1ef2080bdb1c545248406757a984d4b8f9b59855
parent6f0254e6a88ee5e66c8ea5d8723c7adfb7181585 (diff)
Add -M to always turn mouse on in a menu, GitHub issue 3779.
-rw-r--r--cmd-display-menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-display-menu.c b/cmd-display-menu.c
index 7d0d3e59..73728b91 100644
--- a/cmd-display-menu.c
+++ b/cmd-display-menu.c
@@ -39,8 +39,8 @@ const struct cmd_entry cmd_display_menu_entry = {
.name = "display-menu",
.alias = "menu",
- .args = { "b:c:C:H:s:S:Ot:T:x:y:", 1, -1, cmd_display_menu_args_parse },
- .usage = "[-O] [-b border-lines] [-c target-client] "
+ .args = { "b:c:C:H:s:S:MOt:T:x:y:", 1, -1, cmd_display_menu_args_parse },
+ .usage = "[-MO] [-b border-lines] [-c target-client] "
"[-C starting-choice] [-H selected-style] [-s style] "
"[-S border-style] " CMD_TARGET_PANE_USAGE "[-T title] "
"[-x position] [-y position] name key command ...",
@@ -374,7 +374,7 @@ cmd_display_menu_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'O'))
flags |= MENU_STAYOPEN;
- if (!event->m.valid)
+ if (!event->m.valid && !args_has(args, 'M'))
flags |= MENU_NOMOUSE;
if (menu_display(menu, flags, starting_choice, item, px, py, tc, lines,
style, selected_style, border_style, target, NULL, NULL) != 0)