# HG changeset patch
# User Dirkjan Ochtman <dirkjan@ochtman.nl>
# Date 1300019924 -3600
#      Sun Mar 13 13:38:44 2011 +0100
# Node ID 63ab6b0ccedcb393c5adba9be3a8d72fe0e7fb57
# Parent  2151703e7f844fb42864d49c853ea7cb284bbb9b
help: limit documentation width to at most 80 characters

Reading long lines is suboptimal no matter how wide the terminal is.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1985,7 +1985,7 @@
     Returns 0 if successful.
     """
     option_lists = []
-    textwidth = ui.termwidth() - 2
+    textwidth = min(ui.termwidth(), 80) - 2
 
     def addglobalopts(aliases):
         if ui.verbose: