Skip to content
Myr

Handle the case where the ioctl returns sizes == 0

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This occurs in emacs shell buffers, for example, which don't report anything useful for size.

authored by Chris Rose · committed by Chris Rose · parent bf3930d · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:click/helpers.py+1 added-1 removed
143 unmodified lines
144 finally:145 os.close(fd)146 except Exception:147 pass148 if not cr:148 if not cr or not cr[0] or not cr[1]:149 cr = (os.environ.get('LINES', 25),150 os.environ.get('COLUMNS', 80))151 return int(cr[1]), int(cr[0])152
43 unmodified lines