mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Get the whole overlay screen not just the mode so cursor changes are included.
This commit is contained in:
@ -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. */
|
||||
|
Reference in New Issue
Block a user