emacs-diffs
[Top][All Lists]
Advanced

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

master d086d4f: Fix fencepost error in pixel-fill--fill-line


From: Lars Ingebrigtsen
Subject: master d086d4f: Fix fencepost error in pixel-fill--fill-line
Date: Wed, 1 Dec 2021 11:34:14 -0500 (EST)

branch: master
commit d086d4f91d159d554dd8d9200052a66ccf9c287a
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix fencepost error in pixel-fill--fill-line
    
    * lisp/textmodes/pixel-fill.el (pixel-fill--fill-line): Don't add
    a newline (and continuation) if we're at the end of the line.
---
 lisp/textmodes/pixel-fill.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/textmodes/pixel-fill.el b/lisp/textmodes/pixel-fill.el
index 86fdd3c..f69696e 100644
--- a/lisp/textmodes/pixel-fill.el
+++ b/lisp/textmodes/pixel-fill.el
@@ -127,10 +127,11 @@ prefix on subsequent lines."
       ;; Success; continue.
       (when (= (preceding-char) ?\s)
        (delete-char -1))
-      (insert ?\n)
-      (when (> indentation 0)
-        (insert (propertize " " 'display
-                            (list 'space :align-to (list indentation)))))
+      (unless (eobp)
+        (insert ?\n)
+        (when (> indentation 0)
+          (insert (propertize " " 'display
+                              (list 'space :align-to (list indentation))))))
       (setq start (point))
       (pixel-fill--goto-pixel width))))
 



reply via email to

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