From e852822f3db469c985bf022651f184d6ff2c518a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 15 Nov 2021 20:20:30 +0200 Subject: [PATCH] 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) --- lisp/bookmark.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)))))))))) -- 2.39.2