mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-03 07:15:29 -04:00
main: it's not the terminal emulators job to set LINES and COLUMNS
This commit is contained in:
parent
488ad5dc77
commit
19cef74153
1 changed files with 0 additions and 7 deletions
7
main.c
7
main.c
|
|
@ -549,13 +549,6 @@ resize(struct context *c, int width, int height)
|
||||||
LOG_INFO("resize: %dx%d, grid: cols=%d, rows=%d",
|
LOG_INFO("resize: %dx%d, grid: cols=%d, rows=%d",
|
||||||
c->width, c->height, c->term.cols, c->term.rows);
|
c->width, c->height, c->term.cols, c->term.rows);
|
||||||
|
|
||||||
/* Update environment variables */
|
|
||||||
char cols_s[12], rows_s[12];
|
|
||||||
sprintf(cols_s, "%d", c->term.cols);
|
|
||||||
sprintf(rows_s, "%d", c->term.rows);
|
|
||||||
setenv("COLUMNS", cols_s, 1);
|
|
||||||
setenv("LINES", rows_s, 1);
|
|
||||||
|
|
||||||
/* Signal TIOCSWINSZ */
|
/* Signal TIOCSWINSZ */
|
||||||
if (ioctl(c->term.ptmx, TIOCSWINSZ,
|
if (ioctl(c->term.ptmx, TIOCSWINSZ,
|
||||||
&(struct winsize){
|
&(struct winsize){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue