diff options
author | Alex Bochannek <alex@bochannek.com> | 2022-01-15 10:28:14 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-15 10:28:14 +0100 |
commit | f501d0aed00998feb28c6f716e50f22a326b558c (patch) | |
tree | c7ac07292b9fa01dfda8bc66f19cdab5dcbf2b91 /lisp/gnus/gnus-sum.el | |
parent | 7651f044e26d5139d7140e0c4fd052893ef422d7 (diff) | |
download | emacs-f501d0aed00998feb28c6f716e50f22a326b558c.tar.gz emacs-f501d0aed00998feb28c6f716e50f22a326b558c.tar.bz2 emacs-f501d0aed00998feb28c6f716e50f22a326b558c.zip |
(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).
Diffstat (limited to 'lisp/gnus/gnus-sum.el')
-rw-r--r-- | lisp/gnus/gnus-sum.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index d3e476b5d64..6dfdcaf55c7 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))) |