Skip to content

Commit 66edadb

Browse files
alexander-yakushevbbatsov
authored andcommitted
[inspect] Replace overlays with text properties
1 parent 7757df6 commit 66edadb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cider-inspector.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ Can be turned to nil once the user sees and acknowledges the feature."
198198
(visual-line-mode 1))
199199

200200
(defun cider-inspector--highlight-diff-tags ()
201-
"Apply face to #± using overlays.
202-
We use overlays here because font-locking doesn't seem to work for this."
201+
"Apply distinctive face to #± by manually walking through buffer.
202+
Doing this via font-locking rules doesn't seem to work, probably because
203+
the text is already colored by clojure mode font-locking."
203204
(save-excursion
204205
(goto-char (point-min))
205206
(while (search-forward "" nil t)
206-
(let ((overlay (make-overlay (match-beginning 0) (match-end 0))))
207-
(overlay-put overlay 'face 'font-lock-warning-face)
208-
(overlay-put overlay 'priority 100)))))
207+
(put-text-property (match-beginning 0) (match-end 0)
208+
'face 'font-lock-warning-face))))
209209

210210
;;;###autoload
211211
(defun cider-inspect-last-sexp ()

0 commit comments

Comments
 (0)