def resize(self, rows, cols):
if (self.rows == rows) and (self.cols == cols):
return
self.rows = rows
self.cols = cols
self.term.resize(self.rows, self.cols)
if not self.completed:
fcntl.ioctl(self.data_pipe, termios.TIOCSWINSZ, struct.pack("hhhh", self.rows, self.cols, 0, 0))
评论列表
文章目录