author | Martin Geisler <mg@lazybytes.net> |
Thu, 16 Jul 2009 23:25:25 +0200 | |
changeset 9155 | b46063eabe98 |
parent 9142 | 63cfacb7917e |
child 9156 | c9c7e8cdac9c |
mercurial/util.py | file | annotate | diff | comparison | revisions |
--- a/mercurial/util.py Wed Jul 15 17:44:47 2009 +0200 +++ b/mercurial/util.py Thu Jul 16 23:25:25 2009 +0200 @@ -1272,7 +1272,9 @@ pass return 80 -def wrap(line, hangindent, width=78): +def wrap(line, hangindent, width=None): + if width is None: + width = termwidth() - 2 padding = '\n' + ' ' * hangindent return padding.join(textwrap.wrap(line, width=width - hangindent))