mirror of
https://github.com/tmux/tmux.git
synced 2025-12-22 15:36:06 +00:00
Add support for applications to use synchronized output mode (DECSET
2026) to prevent screen tearing during rapid updates. When an application sends SM ?2026, tmux buffers output until RM ?2026 is received or a 1-second timeout expires. From Chris Lloyd with the assistance of Claude Code, GitHub issue 4744.
This commit is contained in:
4
window.c
4
window.c
@@ -990,6 +990,8 @@ window_pane_destroy(struct window_pane *wp)
|
||||
|
||||
if (event_initialized(&wp->resize_timer))
|
||||
event_del(&wp->resize_timer);
|
||||
if (event_initialized(&wp->sync_timer))
|
||||
event_del(&wp->sync_timer);
|
||||
TAILQ_FOREACH_SAFE(r, &wp->resize_queue, entry, r1) {
|
||||
TAILQ_REMOVE(&wp->resize_queue, r, entry);
|
||||
free(r);
|
||||
@@ -1069,6 +1071,8 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
|
||||
if (sx == wp->sx && sy == wp->sy)
|
||||
return;
|
||||
|
||||
screen_write_stop_sync(wp);
|
||||
|
||||
r = xmalloc(sizeof *r);
|
||||
r->sx = sx;
|
||||
r->sy = sy;
|
||||
|
||||
Reference in New Issue
Block a user