From d87e9a59cde7466780c6c9bec4702665f7eb86e1 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 29 Aug 2019 09:18:40 +0200 Subject: [PATCH] Tweak shr background colour handling * lisp/net/shr.el (shr-fill-line): Extend the background to the end of the line when folding lines. --- lisp/net/shr.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.39.2