Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2024-09-30 12:01:11 +01:00
5 changed files with 107 additions and 11 deletions

11
tty.c
View File

@ -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 *);
@ -140,6 +139,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;
@ -2369,7 +2376,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);