From 5fee4638e08b1642a3b8882c5cf8825dd76b3a81 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 7 May 2017 22:27:57 +0000 Subject: Add a format for the name of the pane's mode, lets it be used as a conditional for key bindings. --- format.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'format.c') diff --git a/format.c b/format.c index b64af61e..d6bc9ceb 100644 --- a/format.c +++ b/format.c @@ -1371,6 +1371,9 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp) } format_add(ft, "pane_in_mode", "%d", wp->screen != &wp->base); + if (wp->mode != NULL) + format_add(ft, "pane_mode", "%s", wp->mode->name); + format_add(ft, "pane_synchronized", "%d", !!options_get_number(wp->window->options, "synchronize-panes")); format_add(ft, "pane_search_string", "%s", -- cgit