From: Lars Ingebrigtsen Date: Thu, 29 Aug 2019 07:18:40 +0000 (+0200) Subject: Tweak shr background colour handling X-Git-Tag: emacs-27.0.90~1328^2~46 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d87e9a59cde7466780c6c9bec4702665f7eb86e1;p=emacs.git Tweak shr background colour handling * lisp/net/shr.el (shr-fill-line): Extend the background to the end of the line when folding lines. --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 189873d8cef..81c3fb4aa52 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -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)