(gnus-summary-show-thread): Skip past invisible text when expanding threads.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 30 Sep 2010 21:55:34 +0000 (23:55 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 30 Sep 2010 21:55:34 +0000 (23:55 +0200)
From Jose A. Ortega Ruiz  <jao@gnu.org>  (tiny change)

lisp/ChangeLog
lisp/gnus-sum.el

index 6216baf..7070d10 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-30  Jose A. Ortega Ruiz  <jao@gnu.org>  (tiny change)
+
+       * gnus-sum.el (gnus-summary-show-thread): Skip past invisible text when
+       expanding threads.
+
 2010-09-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnir.el: Use the server names without suffixes (bug #7009).
index 4cd7168..cc1c382 100644 (file)
@@ -11327,15 +11327,19 @@ For compatibility with XEmacs."
   (gnus-remove-overlays (point-min) (point-max) 'invisible 'gnus-sum)
   (gnus-summary-position-point))
 
+(defsubst gnus-summary--inv (p)
+  (and (eq (get-char-property p 'invisible) 'gnus-sum) p))
+
 (defun gnus-summary-show-thread ()
   "Show thread subtrees.
 Returns nil if no thread was there to be shown."
   (interactive)
   (let* ((orig (point))
         (end (point-at-eol))
+         (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end))))
         ;; Leave point at bol
         (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point)))))
-        (eoi (when (eq (get-char-property end 'invisible) 'gnus-sum)
+        (eoi (when end
                (if (fboundp 'next-single-char-property-change)
                    (or (next-single-char-property-change end 'invisible)
                        (point-max))