Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: Fix race condition in Terminal size calculation
On initializing the page there can be a short time window when the terminal's CSS cell size is already set, but the parent element's `client{Width,Height}` are still zero. In that case, `calculateDimensions()` returned a negative rows/cols, which caused a bridge crash: ``` fcntl.ioctl(self._pty_fd, termios.TIOCSWINSZ, struct.pack('2H4x', size.rows, size.cols)) struct.error: 'H' format requires 0 <= number <= 65535 ``` Avoid that by restricting the computed rows/cols to be at least 1.
- Loading branch information