diff lisp/gnus/gnus-sum.el @ 60335:816703abc637

(gnus-summary-exit): Undo last change and fix it in a more conservative way.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 01 Mar 2005 22:44:03 +0000
parents 4104a4e7e5c2
children ae865a366a88 e4694597cbf4
line wrap: on
line diff
--- a/lisp/gnus/gnus-sum.el	Tue Mar 01 16:01:05 2005 +0000
+++ b/lisp/gnus/gnus-sum.el	Tue Mar 01 22:44:03 2005 +0000
@@ -6680,11 +6680,13 @@
       (set-buffer gnus-group-buffer)
       (if quit-config
 	  (gnus-handle-ephemeral-exit quit-config)
+	(goto-char group-point)
+	;; 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))
-	;; Move point after calling gnus-configure-windows to make sure it
-	;; moves the window's point as well.
-	(goto-char group-point))
+	  (gnus-configure-windows 'group 'force)))
       ;; Clear the current group name.
       (unless quit-config
 	(setq gnus-newsgroup-name nil)))))