]> git.eshelyaron.com Git - emacs.git/commitdiff
Flymake: tweak 'fancy' eol diagnostic display
authorJoão Távora <joaotavora@gmail.com>
Thu, 8 May 2025 11:15:24 +0000 (12:15 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 10 May 2025 08:55:25 +0000 (10:55 +0200)
When calculating the face for boxdraw chars, protect against
diagnostics with an empty first line.  Also don't inherit from
:default, which seems to mess up the background color when using
hl-line-mode.

* lisp/progmodes/flymake.el (flymake--eol-draw-fancy): Tweak

(cherry picked from commit 64eb60bd91dbeed458d5a410e6dc9ab4e9e0a10e)

lisp/progmodes/flymake.el

index 8968df8c5fd54d4688b38c2c34c949477785aa6a..e837dc70b19f99609ab7c608fc2a76f056519e86 100644 (file)
@@ -2270,11 +2270,11 @@ defaults to all project diagnostics."
      for height-to-clear = 0 then ret
      for i from 0
      for adjust = (* i 2)
-     for face = `(:inherit default
-                           :foreground
-                           ,(face-attribute
-                             (get-text-property 0 'face text)
-                             :foreground nil t))
+     for face = `(:foreground
+                  ,(face-attribute
+                    (or (get-text-property 0 'face text)
+                        'flymake-error)
+                    :foreground nil t))
      for text-beg-col = (max (- (max 30 (+ line-beg-col 5)) adjust) (+ line-beg-col 1))
      for text-end-col = (max 100 (+ text-beg-col 40))
      for ret = (flymake--eol-draw-fancy-1