Skip to content

Commit

Permalink
Only vanish beacon if the buffer is visible - #60 again
Browse files Browse the repository at this point in the history
  • Loading branch information
Malabarba committed Jul 6, 2018
1 parent fc63ae6 commit 8dfe644
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions beacon.el
Expand Up @@ -249,13 +249,11 @@ COLORS applied to each one."

(defun beacon--vanish (&rest _)
"Turn off the beacon."
(save-match-data
(unless (string-match "\\` *\\*\\(temp\\|temp-buffer\\|Echo Area.*\\)\\*"
(buffer-name))
(when (timerp beacon--timer)
(cancel-timer beacon--timer))
(mapc #'delete-overlay beacon--ovs)
(setq beacon--ovs nil))))
(when (get-buffer-window)
(when (timerp beacon--timer)
(cancel-timer beacon--timer))
(mapc #'delete-overlay beacon--ovs)
(setq beacon--ovs nil)))


;;; Colors
Expand Down

0 comments on commit 8dfe644

Please sign in to comment.