Skip to content

Commit

Permalink
Before adding a permanent overlay, remove temporary overlay
Browse files Browse the repository at this point in the history
Otherwise both overlays remain in effect until the user moves
away from the current symbol.
  • Loading branch information
tarsius committed May 2, 2023
1 parent ed00723 commit 8e39ae3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions symbol-overlay.el
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ Otherwise apply `symbol-overlay-default-face'."
The face is randomly picked from `symbol-overlay-faces'.
If SCOPE is non-nil, put overlays only on occurrences in scope.
If KEYWORD is non-nil, remove it then use its color on new overlays."
(when symbol-overlay-temp-symbol
(symbol-overlay-remove-temp))
(let* ((case-fold-search nil)
(limit (length symbol-overlay-faces))
(face (or (symbol-overlay-maybe-remove keyword)
Expand Down

0 comments on commit 8e39ae3

Please sign in to comment.