From c01ea37abf65db13cb1976bc6bc0663e4d7c6fb8 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 2 May 2023 22:48:11 +0300 Subject: [PATCH] mu4e/thread: don't eat next thread when folding For #2478. --- mu4e/mu4e-thread.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-thread.el b/mu4e/mu4e-thread.el index 150e7e52..ba452cb2 100644 --- a/mu4e/mu4e-thread.el +++ b/mu4e/mu4e-thread.el @@ -220,7 +220,8 @@ Reset individual folding states." (interactive) (unless (eq (line-end-position) (point-max)) (let* ((thread-beg (mu4e-thread-root)) - (thread-end (or (mu4e-thread-next) (point-max))) + (thread-end (mu4e-thread-next)) + (thread-end (if thread-end (1- thread-end) (point-max))) (unread-count 0) (fold-beg (save-excursion (goto-char thread-beg)