Commits

Steve Borho committed 35a70a5

hgtk: adapt to util.wrap changes in 1.7

Comments (0)

Files changed (1)

tortoisehg/hgtk/hgtk.py

     Given an extension name, print help for that extension, and the
     commands it provides."""
     option_lists = []
+    textwidth = ui.termwidth() - 2
 
     def addglobalopts(aliases):
         if ui.verbose:
                 commands = cmds[f].replace("|",", ")
                 ui.write(" %s:\n      %s\n"%(commands, h[f]))
             else:
-                ui.write('%s\n' % (util.wrap(h[f],
+                ui.write('%s\n' % (util.wrap(h[f], textwidth,
                                              initindent=' %-*s   ' % (m, f),
                                              hangindent=' ' * (m + 4))))
 
             if second:
                 initindent = ' %-*s  ' % (opts_len, first)
                 hangindent = ' ' * (opts_len + 3)
-                ui.write('%s\n' % (util.wrap(second,
+                ui.write('%s\n' % (util.wrap(second, textwidth,
                                              initindent=initindent,
                                              hangindent=hangindent)))
             else: