Skip to content

Commit

Permalink
Make bookmark fringe marks evaporate
Browse files Browse the repository at this point in the history
* lisp/bookmark.el (bookmark--set-fringe-mark): Make the bookmark
evaporate when a buffer is erased (like, for instance, when doing
`revert-buffer' in a vc buffer).
  • Loading branch information
larsmagne committed Sep 15, 2021
1 parent fbef1ee commit 3c2753a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/bookmark.el
Expand Up @@ -459,8 +459,9 @@ In other words, return all information but the name."
(defun bookmark--set-fringe-mark ()
"Apply a colorized overlay to the bookmarked location.
See user option `bookmark-set-fringe-mark'."
(let ((bm (make-overlay (point-at-bol) (point-at-bol))))
(let ((bm (make-overlay (point-at-bol) (1+ (point-at-bol)))))
(overlay-put bm 'category 'bookmark)
(overlay-put bm 'evaporate t)
(overlay-put bm 'before-string
(propertize
"x" 'display
Expand Down

0 comments on commit 3c2753a

Please sign in to comment.