From fd451aa7962f399250fd166f207451fcf4b9cb94 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 3 Dec 2020 07:12:11 +0000 Subject: Redraw any visible modes when status line changes so that formats like the pane title are updated. GitHub issue 2487. Also a man page fix from jmc. --- window-client.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'window-client.c') diff --git a/window-client.c b/window-client.c index 5e02462b..ec3c646a 100644 --- a/window-client.c +++ b/window-client.c @@ -30,6 +30,7 @@ static struct screen *window_client_init(struct window_mode_entry *, static void window_client_free(struct window_mode_entry *); static void window_client_resize(struct window_mode_entry *, u_int, u_int); +static void window_client_update(struct window_mode_entry *); static void window_client_key(struct window_mode_entry *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *); @@ -59,6 +60,7 @@ const struct window_mode window_client_mode = { .init = window_client_init, .free = window_client_free, .resize = window_client_resize, + .update = window_client_update, .key = window_client_key, }; @@ -311,6 +313,16 @@ window_client_resize(struct window_mode_entry *wme, u_int sx, u_int sy) mode_tree_resize(data->data, sx, sy); } +static void +window_client_update(struct window_mode_entry *wme) +{ + struct window_client_modedata *data = wme->data; + + mode_tree_build(data->data); + mode_tree_draw(data->data); + data->wp->flags |= PANE_REDRAW; +} + static void window_client_do_detach(void *modedata, void *itemdata, __unused struct client *c, key_code key) -- cgit