1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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.
This commit is contained in:
Lars Ingebrigtsen 2021-12-01 17:33:34 +01:00
parent 0f6bf308ab
commit d086d4f91d

View file

@ -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))))