Use one less than `window-width' as the width
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2013 15:00:54 +0000 (17:00 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2013 15:00:54 +0000 (17:00 +0200)
(shr-insert-document): Use one less than window width if `shr-width' is
nil, since otherwise things may get one character too wide.

lisp/ChangeLog
lisp/shr.el

index baca99e..8f25af7 100644 (file)
@@ -6,6 +6,8 @@
        (shr-tag-dl, shr-tag-dt, shr-tag-dd): Add support for <dl>, <dt> and
        <dd>.
        (shr-make-table-1): Implement <td colspan=> support.
+       (shr-insert-document): Use one less than window width if `shr-width' is
+       nil, since otherwise things may get one character too wide.
 
 2013-06-18  Katsumi Yamaoka  <yamaoka@jpl.org>
 
index 6a26c08..1cf978c 100644 (file)
@@ -176,7 +176,7 @@ DOM should be a parse tree as generated by
        (shr-start nil)
        (shr-base nil)
        (shr-preliminary-table-render 0)
-       (shr-width (or shr-width (window-width))))
+       (shr-width (or shr-width (1- (window-width)))))
     (shr-descend (shr-transform-dom dom))
     (shr-remove-trailing-whitespace start (point))))