emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f501d0aed0: (gnus-summary-hide-thread): Fix thread hiding for dum


From: Lars Ingebrigtsen
Subject: master f501d0aed0: (gnus-summary-hide-thread): Fix thread hiding for dummy roots.
Date: Sat, 15 Jan 2022 04:28:53 -0500 (EST)

branch: master
commit f501d0aed00998feb28c6f716e50f22a326b558c
Author: Alex Bochannek <alex@bochannek.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    (gnus-summary-hide-thread): Fix thread hiding for dummy roots.
    
    * lisp/gnus/gnus-sum.el (gnus-summary-hide-thread): Make thread
    hiding work when using dummy `gnus-summary-make-false-root'
    (bug#52923).
---
 lisp/gnus/gnus-sum.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index d3e476b5d6..6dfdcaf55c 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -11898,7 +11898,8 @@ Returns nil if no threads were there to be hidden."
   (beginning-of-line)
   (let ((start (point))
        (starteol (line-end-position))
-       (article (gnus-summary-article-number)))
+       (article (unless (gnus-summary-article-intangible-p)
+                   (gnus-summary-article-number))))
     ;; Go forward until either the buffer ends or the subthread ends.
     (when (and (not (eobp))
               (or (zerop (gnus-summary-next-thread 1 t))
@@ -11912,7 +11913,9 @@ Returns nil if no threads were there to be hidden."
              (let ((ol (make-overlay starteol (point) nil t nil)))
                (overlay-put ol 'invisible 'gnus-sum)
                (overlay-put ol 'evaporate t)))
-           (gnus-summary-goto-subject article)
+           (if article
+                (gnus-summary-goto-subject article)
+              (gnus-summary-position-point))
            ;; We moved backward past the start point (invisible thread?)
             (when (> start (point))
               (goto-char starteol)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]