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:
nicm
2024-09-30 08:10:20 +00:00
parent f95d055e04
commit 89adec0ca5
3 changed files with 91 additions and 2 deletions

3
tmux.h
View File

@ -1474,6 +1474,7 @@ struct tty {
#define TTY_HAVEXDA 0x200
#define TTY_SYNCING 0x400
#define TTY_HAVEDA2 0x800 /* Secondary DA. */
#define TTY_WINSIZEQUERY 0x1000
#define TTY_ALL_REQUEST_FLAGS \
(TTY_HAVEDA|TTY_HAVEDA2|TTY_HAVEXDA)
int flags;
@ -2307,6 +2308,7 @@ typedef void (*job_free_cb) (void *);
#define JOB_NOWAIT 0x1
#define JOB_KEEPWRITE 0x2
#define JOB_PTY 0x4
#define JOB_DEFAULTSHELL 0x8
struct job *job_run(const char *, int, char **, struct environ *,
struct session *, const char *, job_update_cb,
job_complete_cb, job_free_cb, void *, int, int, int);
@ -2369,6 +2371,7 @@ void tty_cell(struct tty *, const struct grid_cell *,
int tty_init(struct tty *, struct client *);
void tty_resize(struct tty *);
void tty_set_size(struct tty *, u_int, u_int, u_int, u_int);
void tty_invalidate(struct tty *);
void tty_start_tty(struct tty *);
void tty_send_requests(struct tty *);
void tty_repeat_requests(struct tty *);