changeset 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 ec7a860cdd57
children 41ee53e68f75
files lisp/gnus/gnus-sum.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
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)))))