shr.el (shr-rescale-image): Undo previous change; see <http://lists.gnu.org/archive...
[gnus] / lisp / shr.el
index 2f6a04c..35c7c44 100644 (file)
@@ -161,7 +161,7 @@ DOM should be a parse tree as generated by
       (goto-char start)
       (while (not (eobp))
        (end-of-line)
-       (when (> (current-column) width)
+       (when (> (shr-previous-newline-padding-width (current-column)) width)
          (dolist (overlay (overlays-at (point)))
            (when (overlay-get overlay 'before-string)
              (overlay-put overlay 'before-string nil))))
@@ -615,8 +615,7 @@ size, and full-buffer size."
 (defun shr-rescale-image (data &optional force)
   "Rescale DATA, if too big, to fit the current buffer.
 If FORCE, rescale the image anyway."
-  (let* ((max-image-size nil)
-        (image (create-image data nil t :ascent 100)))
+  (let ((image (create-image data nil t :ascent 100)))
     (if (or (not (fboundp 'imagemagick-types))
            (not (get-buffer-window (current-buffer))))
        image