]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix resetting of gnus-pick-line-number
authorPankaj Jangid <pankaj@codeisgreat.org>
Wed, 16 Dec 2020 22:34:20 +0000 (23:34 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 16 Dec 2020 22:34:20 +0000 (23:34 +0100)
* lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Move setting
gnus-pick-line-number from here (bug#45269)...
(gnus-summary-prepare): To here.  This ensures that the number is
reset when regenerating the buffer, for instance when limiting it.

lisp/gnus/gnus-sum.el

index 9488b324878a3a94b5b4a7f49bb63ae05c828703..16152e252a02456e5defbc1d165eaf914111478c 100644 (file)
@@ -4100,8 +4100,6 @@ If SELECT-ARTICLES, only select those articles from GROUP."
      ;; The group was successfully selected.
      (t
       (gnus-set-global-variables)
-      (when (boundp 'gnus-pick-line-number)
-       (setq gnus-pick-line-number 0))
       (when (boundp 'spam-install-hooks)
        (spam-initialize))
       ;; Save the active value in effect when the group was entered.
@@ -4226,6 +4224,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
          gnus-newsgroup-data-reverse nil)
     (gnus-run-hooks 'gnus-summary-generate-hook)
     ;; Generate the buffer, either with threads or without.
+    (when (boundp 'gnus-pick-line-number)
+      (setq gnus-pick-line-number 0))
     (when gnus-newsgroup-headers
       (gnus-summary-prepare-threads
        (if gnus-show-threads