]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak shr background colour handling
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 29 Aug 2019 07:18:40 +0000 (09:18 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 29 Aug 2019 07:19:19 +0000 (09:19 +0200)
* lisp/net/shr.el (shr-fill-line): Extend the background to the
end of the line when folding lines.

lisp/net/shr.el

index 189873d8cef8dcd666df46e465dffd311ec64cf4..81c3fb4aa52649f56283bf881c20778fbe9f916e 100644 (file)
@@ -715,8 +715,12 @@ size, and full-buffer size."
         ;; Success; continue.
         (when (= (preceding-char) ?\s)
          (delete-char -1))
-        (let ((gap-start (point)))
-          (insert "\n")
+        (let ((gap-start (point))
+              (face (get-text-property (point) 'face)))
+          ;; Extend the background to the end of the line.
+          (if face
+              (insert (propertize "\n" 'face (shr-face-background face)))
+            (insert "\n"))
          (shr-indent)
           (when (and (> (1- gap-start) (point-min))
                      (get-text-property (point) 'shr-url)