Get the whole overlay screen not just the mode so cursor changes are included.

This commit is contained in:
Nicholas Marriott
2020-05-01 17:30:28 +01:00
parent 8110c7a25f
commit 3f1fc9cde3
3 changed files with 10 additions and 14 deletions

View File

@ -1542,7 +1542,7 @@ server_client_reset_state(struct client *c)
struct window_pane *wp = w->active, *loop;
struct screen *s;
struct options *oo = c->session->options;
int mode, cursor, flags;
int mode = 0, cursor, flags;
u_int cx = 0, cy = 0, ox, oy, sx, sy;
if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED))
@ -1553,18 +1553,14 @@ server_client_reset_state(struct client *c)
tty->flags &= ~TTY_BLOCK;
/* Get mode from overlay if any, else from screen. */
if (c->overlay_draw != NULL) {
s = NULL;
if (c->overlay_mode == NULL)
mode = 0;
else
mode = c->overlay_mode(c, &cx, &cy);
} else {
if (c->overlay_draw != NULL && c->overlay_mode != NULL)
s = c->overlay_mode(c, &cx, &cy);
else
s = wp->screen;
if (s != NULL)
mode = s->mode;
if (c->prompt_string != NULL || c->message_string != NULL)
mode &= ~MODE_CURSOR;
}
if (c->prompt_string != NULL || c->message_string != NULL)
mode &= ~MODE_CURSOR;
log_debug("%s: client %s mode %x", __func__, c->name, mode);
/* Reset region and margin. */