Special-case background colours.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 27 Jan 2011 10:13:55 +0000 (02:13 -0800)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 27 Jan 2011 10:13:55 +0000 (02:13 -0800)
Do put them at the blank parts at the front of the lines.

lisp/ChangeLog
lisp/shr.el

index 5f7e090..2ba8461 100644 (file)
@@ -1,5 +1,8 @@
 2011-01-27  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * shr.el (shr-put-color): Special-case background colours: Do put them
+       at the blank parts at the front of the lines.
+
        * gnus-draft.el (gnus-draft-clear-marks): New function to be run as an
        exit hook to nix out all data on readedness on group exit.
 
index 899a5de..4568f45 100644 (file)
@@ -612,7 +612,8 @@ ones, in case fg and bg are nil."
   (save-excursion
     (goto-char start)
     (while (< (point) end)
-      (when (bolp)
+      (when (and (bolp)
+                (not (eq type :background)))
        (skip-chars-forward " "))
       (when (> (line-end-position) (point))
        (shr-put-color-1 (point) (min (line-end-position) end) type color))