Report the window width and height for TIOCSWINSZ

Matches behavior of xterm
This commit is contained in:
Kovid Goyal
2017-01-23 18:41:41 +05:30
parent 9cfa3dd0ea
commit d8545e5c43
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -75,9 +75,9 @@ class Child:
t.start()
return pid
def resize_pty(self, w, h):
def resize_pty(self, w, h, ww, wh):
if self.child_fd is not None:
fcntl.ioctl(self.child_fd, termios.TIOCSWINSZ, struct.pack('4H', h, w, 0, 0))
fcntl.ioctl(self.child_fd, termios.TIOCSWINSZ, struct.pack('4H', h, w, ww, wh))
def hangup(self):
if self.pid is not None: