diff options
Diffstat (limited to 'usr.bin/tmux/cmd-choose-tree.c')
-rw-r--r-- | usr.bin/tmux/cmd-choose-tree.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c index e9c9115bdda..61f9d68f5d0 100644 --- a/usr.bin/tmux/cmd-choose-tree.c +++ b/usr.bin/tmux/cmd-choose-tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-choose-tree.c,v 1.46 2020/04/13 10:59:58 nicm Exp $ */ +/* $OpenBSD: cmd-choose-tree.c,v 1.47 2020/05/16 16:02:24 nicm Exp $ */ /* * Copyright (c) 2012 Thomas Adam <thomas@xteddy.org> @@ -68,6 +68,19 @@ const struct cmd_entry cmd_choose_buffer_entry = { .exec = cmd_choose_tree_exec }; +const struct cmd_entry cmd_customize_mode_entry = { + .name = "customize-mode", + .alias = NULL, + + .args = { "F:f:Nt:Z", 0, 0 }, + .usage = "[-NZ] [-F format] [-f filter] " CMD_TARGET_PANE_USAGE, + + .target = { 't', CMD_FIND_PANE, 0 }, + + .flags = 0, + .exec = cmd_choose_tree_exec +}; + static enum cmd_retval cmd_choose_tree_exec(struct cmd *self, struct cmdq_item *item) { @@ -84,7 +97,9 @@ cmd_choose_tree_exec(struct cmd *self, struct cmdq_item *item) if (server_client_how_many() == 0) return (CMD_RETURN_NORMAL); mode = &window_client_mode; - } else + } else if (cmd_get_entry(self) == &cmd_customize_mode_entry) + mode = &window_customize_mode; + else mode = &window_tree_mode; window_pane_set_mode(wp, NULL, mode, target, args); |