]> git.eshelyaron.com Git - emacs.git/commitdiff
Place point consistently in the Gnus group buffer on exit
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 17 Apr 2018 17:21:42 +0000 (19:21 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 17 Apr 2018 17:21:42 +0000 (19:21 +0200)
* lisp/gnus/gnus-sum.el (gnus-summary-exit): Place point correctly
when exiting with `q' (and the like) from the article buffer when
only the article buffer is displayed (bug#31195).  This is
apparently yet another fall-out from the "preserve-visible-point-
in-windows" patches of yesteryear...

lisp/gnus/gnus-sum.el

index b68dfdf6b799a8ac459adf9665cbb952b9c93940..234d527cd10afd930e67d1e8e11cf70df6af3b14 100644 (file)
@@ -7286,12 +7286,13 @@ If FORCE (the prefix), also save the .newsrc file(s)."
       (if quit-config
          (gnus-handle-ephemeral-exit quit-config)
        (goto-char group-point)
+       (unless leave-hidden
+         (gnus-configure-windows 'group 'force))
        ;; If gnus-group-buffer is already displayed, make sure we also move
        ;; the cursor in the window that displays it.
        (let ((win (get-buffer-window (current-buffer) 0)))
-         (if win (set-window-point win (point))))
-       (unless leave-hidden
-         (gnus-configure-windows 'group 'force)))
+         (goto-char group-point)
+         (if win (set-window-point win (point)))))
 
       ;; If we have several article buffers, we kill them at exit.
       (unless single-article-buffer