mu4e-mark: handle case when mark line cannot fit

ht: @kpzart.

Fixes #2782.
This commit is contained in:
Dirk-Jan C. Binnema
2024-11-10 14:15:52 +02:00
parent b0d8d42dd2
commit 7e798f50c8

View File

@ -281,7 +281,8 @@ The following marks are available, and the corresponding props:
;; the docid cookie and then we skip the mu4e--mark-fringe ;; the docid cookie and then we skip the mu4e--mark-fringe
(start (+ (length mu4e--mark-fringe) (start (+ (length mu4e--mark-fringe)
(mu4e~headers-goto-docid docid t))) (mu4e~headers-goto-docid docid t)))
(overlay (make-overlay start (+ start (length targetstr))))) (overlay (make-overlay start (min (line-end-position)
(+ start (length targetstr))))))
(overlay-put overlay 'display targetstr) (overlay-put overlay 'display targetstr)
(overlay-put overlay 'mu4e-mark t) (overlay-put overlay 'mu4e-mark t)
(overlay-put overlay 'evaporate t) (overlay-put overlay 'evaporate t)