mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 12:14:43 +00:00
Do not allow cursor on/off to escape synchronized updates.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: screen-redraw.c,v 1.157 2026/07/24 08:49:23 nicm Exp $ */
|
/* $OpenBSD: screen-redraw.c,v 1.158 2026/09/01 19:50:58 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -1738,8 +1738,7 @@ redraw_draw(struct client *c, struct window_pane *wp, int flags)
|
|||||||
else
|
else
|
||||||
loop->flags &= ~PANE_NEWSTATUS;
|
loop->flags &= ~PANE_NEWSTATUS;
|
||||||
|
|
||||||
width = redraw_pane_status_width(&dctx, loop,
|
width = redraw_pane_status_width(&dctx, loop, &first);
|
||||||
&first);
|
|
||||||
if (width == 0)
|
if (width == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -1770,7 +1769,7 @@ redraw_draw(struct client *c, struct window_pane *wp, int flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tty_sync_start(tty);
|
tty_sync_start(tty); /* end in server_client_reset_state */
|
||||||
tty_update_mode(tty, tty->mode & ~CURSOR_MODES, NULL);
|
tty_update_mode(tty, tty->mode & ~CURSOR_MODES, NULL);
|
||||||
|
|
||||||
if (wp != NULL)
|
if (wp != NULL)
|
||||||
@@ -1815,7 +1814,6 @@ redraw_draw(struct client *c, struct window_pane *wp, int flags)
|
|||||||
c->overlay_draw(c, c->overlay_data);
|
c->overlay_draw(c, c->overlay_data);
|
||||||
|
|
||||||
tty_reset(tty);
|
tty_reset(tty);
|
||||||
tty_sync_end(tty);
|
|
||||||
|
|
||||||
log_debug("%s: finished @%u redraw", c->name, scene->w->id);
|
log_debug("%s: finished @%u redraw", c->name, scene->w->id);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: server-client.c,v 1.509 2026/08/28 07:36:01 nicm Exp $ */
|
/* $OpenBSD: server-client.c,v 1.510 2026/09/01 19:50:58 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -2249,7 +2249,7 @@ server_client_reset_state(struct client *c)
|
|||||||
cy += status_line_size(c);
|
cy += status_line_size(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pane_mode & MODE_SYNC) || !cursor)
|
if (!cursor)
|
||||||
mode &= ~MODE_CURSOR;
|
mode &= ~MODE_CURSOR;
|
||||||
}
|
}
|
||||||
} else if (c->overlay_mode == NULL || s == NULL)
|
} else if (c->overlay_mode == NULL || s == NULL)
|
||||||
@@ -2257,6 +2257,10 @@ server_client_reset_state(struct client *c)
|
|||||||
if (~pane_mode & MODE_SYNC) {
|
if (~pane_mode & MODE_SYNC) {
|
||||||
log_debug("%s: cursor to %u,%u", __func__, cx, cy);
|
log_debug("%s: cursor to %u,%u", __func__, cx, cy);
|
||||||
tty_cursor(tty, cx, cy);
|
tty_cursor(tty, cx, cy);
|
||||||
|
} else {
|
||||||
|
mode &= ~CURSOR_MODES;
|
||||||
|
mode |= tty->mode & CURSOR_MODES;
|
||||||
|
s = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user