Fix point movement when hiding threads
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 24 Dec 2012 16:08:55 +0000 (17:08 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 24 Dec 2012 16:08:55 +0000 (17:08 +0100)
* gnus-sum.el (gnus-summary-hide-thread): If point were further to the
right than four characters, this command would move point to
`point-max'.  Don't do that.

lisp/ChangeLog
lisp/gnus-sum.el

index eb876d1..89b6c67 100644 (file)
@@ -1,5 +1,9 @@
 2012-12-24  Lars Ingebrigtsen  <larsi@gnus.org>
 
 2012-12-24  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-sum.el (gnus-summary-hide-thread): If point were further to the
+       right than four characters, this command would move point to
+       `point-max'.  Don't do that.
+
        * gnus-group.el (gnus-group-read-ephemeral-group): Set the active data
        to nil to allow re-selecting groups that gain articles.
        (gnus-bug-group-download-format-alist): Update the URL.
        * gnus-group.el (gnus-group-read-ephemeral-group): Set the active data
        to nil to allow re-selecting groups that gain articles.
        (gnus-bug-group-download-format-alist): Update the URL.
index 4b00e99..91f369b 100644 (file)
@@ -11658,10 +11658,10 @@ If PREDICATE is supplied, threads that satisfy this predicate
 will not be hidden.
 Returns nil if no threads were there to be hidden."
   (interactive)
 will not be hidden.
 Returns nil if no threads were there to be hidden."
   (interactive)
+  (beginning-of-line)
   (let ((start (point))
        (starteol (line-end-position))
        (article (gnus-summary-article-number)))
   (let ((start (point))
        (starteol (line-end-position))
        (article (gnus-summary-article-number)))
-    (goto-char start)
     ;; Go forward until either the buffer ends or the subthread ends.
     (when (and (not (eobp))
               (or (zerop (gnus-summary-next-thread 1 t))
     ;; Go forward until either the buffer ends or the subthread ends.
     (when (and (not (eobp))
               (or (zerop (gnus-summary-next-thread 1 t))