mirror of
https://github.com/tmux/tmux.git
synced 2026-10-15 07:44:24 +00:00
Recalculate window sizes when the terminal reports its pixel size.
The reply to CSI 14t updated the client's cell size but not the windows, which kept the default 16x32 cell size until some other event (a resize, or any client connecting or exiting) triggered recalculate_sizes(). Images parsed in the meantime were sized for the wrong cell and drawn at the wrong size. Recalculate when the reply arrives, and extend the reply test to check that the window follows the client without any other event.
This commit is contained in:
@@ -1927,6 +1927,9 @@ tty_keys_winsz(struct tty *tty, const char *buf, size_t len, size_t *size,
|
||||
tty_set_size(tty, tty->sx, tty->sy, char_x, char_y);
|
||||
tty_invalidate(tty);
|
||||
|
||||
/* Windows take their cell size from the clients. */
|
||||
recalculate_sizes();
|
||||
|
||||
tty->flags &= ~TTY_WINSIZEQUERY;
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user