From 7e798f50c8b721d11c690c764b0428a8fe2a1c94 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 10 Nov 2024 14:15:52 +0200 Subject: [PATCH] mu4e-mark: handle case when mark line cannot fit ht: @kpzart. Fixes #2782. --- mu4e/mu4e-mark.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-mark.el b/mu4e/mu4e-mark.el index 39103bad..aa4271cf 100644 --- a/mu4e/mu4e-mark.el +++ b/mu4e/mu4e-mark.el @@ -281,7 +281,8 @@ The following marks are available, and the corresponding props: ;; the docid cookie and then we skip the mu4e--mark-fringe (start (+ (length mu4e--mark-fringe) (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 'mu4e-mark t) (overlay-put overlay 'evaporate t)