]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix removal of fringe marks of deleted bookmarks
authorEli Zaretskii <eliz@gnu.org>
Mon, 15 Nov 2021 18:20:30 +0000 (20:20 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 15 Nov 2021 18:20:30 +0000 (20:20 +0200)
* lisp/bookmark.el (bookmark--remove-fringe-mark): The fringe
overlay is at BOL, not at POS.  (Bug#51233)

lisp/bookmark.el

index fb90f01456e4add8cfb76c8e6e4763695fc84db5..623f0acd28a67cbf68e27e5290015b3567b00f8a 100644 (file)
@@ -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))))))))))