Refresh copy mode when style changes, from Josh Cooper in GitHub issue 4830.

This commit is contained in:
nicm
2026-02-03 08:53:58 +00:00
parent 3c3d9ce3a9
commit 588013bb44
3 changed files with 29 additions and 3 deletions

View File

@@ -2709,14 +2709,26 @@ server_client_handle_key(struct client *c, struct key_event *event)
void
server_client_loop(void)
{
struct client *c;
struct window *w;
struct window_pane *wp;
struct client *c;
struct window *w;
struct window_pane *wp;
struct window_mode_entry *wme;
/* Check for window resize. This is done before redrawing. */
RB_FOREACH(w, windows, &windows)
server_client_check_window_resize(w);
/* Notify modes that pane styles may have changed. */
RB_FOREACH(w, windows, &windows) {
TAILQ_FOREACH(wp, &w->panes, entry) {
if (wp->flags & PANE_STYLECHANGED) {
wme = TAILQ_FIRST(&wp->modes);
if (wme != NULL && wme->mode->style_changed != NULL)
wme->mode->style_changed(wme);
}
}
}
/* Check clients. */
TAILQ_FOREACH(c, &clients, entry) {
server_client_check_exit(c);