From 617e8023f67292d0d4f737b087a1dd66abc13171 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Mon, 12 Jul 2021 06:47:36 +0200 Subject: [PATCH] Fix mu4e-headers-prev with invisible lines Skip invisible text at BOL possibly hidden by the end of another invisible overlay covering previous EOL. This patch affects people using mu4e-thread-folding-mode but change nothing when using mu4e as it is. --- mu4e/mu4e-headers.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index 62d409a1..7c76a85a 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -1846,8 +1846,13 @@ docid. Otherwise, return nil." (cl-flet ((goto-next-line (arg) (condition-case _err - (and (let (line-move-visual) - (line-move arg)) 0) + (prog1 + (let (line-move-visual) + (and (line-move arg) 0)) + ;; Skip invisible text at BOL possibly hidden by + ;; the end of another invisible overlay covering + ;; previous EOL. + (move-to-column 2)) ((beginning-of-buffer end-of-buffer) 1)))) (let* ((_succeeded (zerop (goto-next-line lines)))