mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
On some Windows terminals, if TIOCWINSZ does not return xpixel and
ypixel (they are zero), if this is the case then try the query escape sequences. From Dmitry Galchinsky in GitHub issue 4099.
This commit is contained in:
11
tty.c
11
tty.c
@ -42,7 +42,6 @@ static void tty_cursor_pane(struct tty *, const struct tty_ctx *, u_int,
|
||||
u_int);
|
||||
static void tty_cursor_pane_unless_wrap(struct tty *,
|
||||
const struct tty_ctx *, u_int, u_int);
|
||||
static void tty_invalidate(struct tty *);
|
||||
static void tty_colours(struct tty *, const struct grid_cell *);
|
||||
static void tty_check_fg(struct tty *, struct colour_palette *,
|
||||
struct grid_cell *);
|
||||
@ -135,6 +134,14 @@ tty_resize(struct tty *tty)
|
||||
ypixel = 0;
|
||||
} else
|
||||
ypixel = ws.ws_ypixel / sy;
|
||||
|
||||
if ((xpixel == 0 || ypixel == 0) &&
|
||||
tty->out != NULL &&
|
||||
!(tty->flags & TTY_WINSIZEQUERY) &&
|
||||
(tty->term->flags & TERM_VT100LIKE)) {
|
||||
tty_puts(tty, "\033[18t\033[14t");
|
||||
tty->flags |= TTY_WINSIZEQUERY;
|
||||
}
|
||||
} else {
|
||||
sx = 80;
|
||||
sy = 24;
|
||||
@ -2247,7 +2254,7 @@ tty_reset(struct tty *tty)
|
||||
memcpy(&tty->last_cell, &grid_default_cell, sizeof tty->last_cell);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
tty_invalidate(struct tty *tty)
|
||||
{
|
||||
memcpy(&tty->cell, &grid_default_cell, sizeof tty->cell);
|
||||
|
Reference in New Issue
Block a user