forked from mirrors/org-mode
org-latex-preview: Set overlay priority to -80
* lisp/org-latex-preview.el (org-latex-preview--ensure-overlay): Setting the overlay priority to -80 ensures that the background colour of hl-line-mode's overlays takes priority, improving the visual consistency of previews in the buffer.
This commit is contained in:
parent
39e0faebd1
commit
4ec83eb21e
|
@ -307,6 +307,9 @@ in `org-latex-preview--svg-make-fg-currentColor', and so it
|
|||
should be a color that is extremely likely not otherwise found in
|
||||
the image.")
|
||||
|
||||
(defconst org-latex-preview--overlay-priority -80
|
||||
"The priority used with preview overlays.")
|
||||
|
||||
(defun org-latex-preview--ensure-overlay (beg end)
|
||||
"Build an overlay between BEG and END."
|
||||
(let (ov)
|
||||
|
@ -334,6 +337,7 @@ the image.")
|
|||
(setq ov (make-overlay beg end nil 'front-advance))
|
||||
(overlay-put ov 'org-overlay-type 'org-latex-overlay)
|
||||
(overlay-put ov 'evaporate t)
|
||||
(overlay-put ov 'priority org-latex-preview--overlay-priority)
|
||||
(overlay-put ov 'modification-hooks
|
||||
(list #'org-latex-preview-auto--mark-overlay-modified))
|
||||
(overlay-put ov 'insert-in-front-hooks
|
||||
|
|
Loading…
Reference in New Issue