termpty: avoid ERR on exit of shell when keeping screen opened
This commit is contained in:
parent
b2b4c8cb18
commit
cfdab5a2af
|
@ -220,6 +220,7 @@ _pty_size(Termpty *ty)
|
||||||
sz.ws_row = ty->h;
|
sz.ws_row = ty->h;
|
||||||
sz.ws_xpixel = 0;
|
sz.ws_xpixel = 0;
|
||||||
sz.ws_ypixel = 0;
|
sz.ws_ypixel = 0;
|
||||||
|
if (ty->fd >= 0)
|
||||||
if (ioctl(ty->fd, TIOCSWINSZ, &sz) < 0)
|
if (ioctl(ty->fd, TIOCSWINSZ, &sz) < 0)
|
||||||
ERR(_("Size set ioctl failed: %s"), strerror(errno));
|
ERR(_("Size set ioctl failed: %s"), strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue