]> code.delx.au - gnu-emacs-elpa/blobdiff - beacon.el
Fix weird beacon color when point coincides with an overlay
[gnu-emacs-elpa] / beacon.el
index 9e211e22a0476f9e26808a27a19c4f5ef7d4cef7..c2b5f6b0b89907da83d569b9eeadafafee5cd2ca 100644 (file)
--- a/beacon.el
+++ b/beacon.el
@@ -255,7 +255,10 @@ Only returns `beacon-size' elements."
 
 (defun beacon--color-range ()
   "Return a list of background colors for the beacon."
-  (let* ((default-bg (or (background-color-at-point)
+  (let* ((default-bg (or (save-excursion
+                           (forward-line 1)
+                           (forward-char -1)
+                           (background-color-at-point))
                          (face-background 'default)))
          (bg (color-values (if (string-match "\\`unspecified-" default-bg)
                                (face-attribute 'beacon-fallback-background :background)