Mercurial > public > mercurial-scm > hg
diff mercurial/ui.py @ 30314:365812902904
scmutil: extend termwidth() to return terminal height, renamed to termsize()
It appears crecord.py has its own termsize() function. I want to get rid of it.
The fallback height is chosen from the default of cmd.exe on Windows, and
VT100 on Unix.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 20 Oct 2016 23:09:05 +0900 |
parents | 5c379b1f56c7 |
children | 318a24b52eeb |
line wrap: on
line diff
--- a/mercurial/ui.py Thu Oct 20 22:57:12 2016 +0900 +++ b/mercurial/ui.py Thu Oct 20 23:09:05 2016 +0900 @@ -822,7 +822,7 @@ return int(encoding.environ['COLUMNS']) except ValueError: pass - return scmutil.termwidth(self) + return scmutil.termsize(self)[0] def formatted(self): '''should formatted output be used?