emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] shr-fontified 9ce268a 3/4: Fix computation of unfolded tex


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] shr-fontified 9ce268a 3/4: Fix computation of unfolded text
Date: Fri, 30 Jan 2015 05:46:16 +0000

branch: shr-fontified
commit 9ce268ae755ea5a6f2fe0643a356c128b326b1de
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>

    Fix computation of unfolded text
---
 lisp/net/shr.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 318f487..a10b2a8 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -528,16 +528,16 @@ size, and full-buffer size."
                    (< this-width shr-internal-width))
          (setq this-width (+ this-width (aref widths i))
                i (1+ i))
-         (unless (eobp)
+         (unless (eolp)
            (forward-char 1)))
-       (when (< i (length widths))
+       (when (>= this-width shr-internal-width)
          ;; We have to do some folding.  First find the first
          ;; previous point suitable for folding.
          (let ((end (point)))
            (shr-find-fill-point (line-beginning-position))
            ;; Adjust the index to where we moved when finding the
            ;; fill point.
-           (setq i (+ i (- end (point)))
+           (setq i (+ i (- (point) end))
                  this-width 0)
            (when (= (preceding-char) ?\s)
              (delete-char -1))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]