Fix bug where _pty_size() returns unreasonable rows/cols in Emacs