summaryrefslogtreecommitdiff
path: root/lisp/bookmark.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-11-15 20:20:30 +0200
committerEli Zaretskii <eliz@gnu.org>2021-11-15 20:20:30 +0200
commite852822f3db469c985bf022651f184d6ff2c518a (patch)
tree78fa44f5a1507808eaa87b2f9ce18d1fee549ca4 /lisp/bookmark.el
parentb418aad85a3d62aa427e7af72c96ca1d644dbc02 (diff)
downloademacs-e852822f3db469c985bf022651f184d6ff2c518a.tar.gz
Fix removal of fringe marks of deleted bookmarks
* lisp/bookmark.el (bookmark--remove-fringe-mark): The fringe overlay is at BOL, not at POS. (Bug#51233)
Diffstat (limited to 'lisp/bookmark.el')
-rw-r--r--lisp/bookmark.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index fb90f01456e..623f0acd28a 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -479,7 +479,10 @@ See user option `bookmark-set-fringe'."
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (equal filename buffer-file-name)
- (setq overlays (overlays-in pos (1+ pos)))
+ (setq overlays
+ (save-excursion
+ (goto-char pos)
+ (overlays-in (point-at-bol) (1+ (point-at-bol)))))
(while (and (not found) (setq temp (pop overlays)))
(when (eq 'bookmark (overlay-get temp 'category))
(delete-overlay (setq found temp))))))))))