]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: fix dangling overlays in notmuch-search
authorMatt Armstrong <matt@rfc20.org>
Thu, 13 Oct 2022 03:20:38 +0000 (20:20 -0700)
committerDavid Bremner <david@tethera.net>
Sat, 5 Nov 2022 17:13:43 +0000 (13:13 -0400)
notmuch-search-insert-authors now sets the evaporate property on the
ellipsis overlays.  Emacs will delete them when the buffer contents
are zeroed out, which happens with `notmuch-refresh-buffer`.  This
prevents them from being collapsed to zero-width overlays in position
1.  See Emacs bug#58479.  An upcoming change in Emacs will make these
dangling overlays visible to the user.

emacs/notmuch.el

index 2618175819374de5de86c6ff94cd0b31954ed071..6eef4af13341733da81ad4c603c5546c4c9aae8a 100644 (file)
@@ -841,6 +841,7 @@ non-authors is found, assume that all of the authors match."
              overlay)
          (insert invisible-string)
          (setq overlay (make-overlay start (point)))
+         (overlay-put overlay 'evaporate t)
          (overlay-put overlay 'invisible 'ellipsis)
          (overlay-put overlay 'isearch-open-invisible #'delete-overlay)))
       (insert padding))))