Show More
@@ -1949,7 +1949,7 b' def help_(ui, name=None, with_version=Fa' | |||
|
1949 | 1949 | commands = cmds[f].replace("|",", ") |
|
1950 | 1950 | ui.write(" %s:\n %s\n"%(commands, h[f])) |
|
1951 | 1951 | else: |
|
1952 | ui.write('%s\n' % (util.wrap(h[f], | |
|
1952 | ui.write('%s\n' % (util.wrap(h[f], textwidth, | |
|
1953 | 1953 | initindent=' %-*s ' % (m, f), |
|
1954 | 1954 | hangindent=' ' * (m + 4)))) |
|
1955 | 1955 | |
@@ -2106,7 +2106,7 b' def help_(ui, name=None, with_version=Fa' | |||
|
2106 | 2106 | if desc: |
|
2107 | 2107 | initindent = ' %s%s ' % (opt, ' ' * (hanging - width)) |
|
2108 | 2108 | hangindent = ' ' * (hanging + 3) |
|
2109 | ui.write('%s\n' % (util.wrap(desc, | |
|
2109 | ui.write('%s\n' % (util.wrap(desc, textwidth, | |
|
2110 | 2110 | initindent=initindent, |
|
2111 | 2111 | hangindent=hangindent))) |
|
2112 | 2112 | else: |
@@ -1313,9 +1313,7 b' class MBTextWrapper(textwrap.TextWrapper' | |||
|
1313 | 1313 | |
|
1314 | 1314 | #### naming convention of above implementation follows 'textwrap' module |
|
1315 | 1315 | |
|
1316 |
def wrap(line, width |
|
|
1317 | if width is None: | |
|
1318 | width = termwidth() - 2 | |
|
1316 | def wrap(line, width, initindent='', hangindent=''): | |
|
1319 | 1317 | maxindent = max(len(hangindent), len(initindent)) |
|
1320 | 1318 | if width <= maxindent: |
|
1321 | 1319 | # adjust for weird terminal size |
General Comments 0
You need to be logged in to leave comments.
Login now