X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/6d7132563c23774dddcd825797a29ce7ae94253a..06b840e0d96538cfa879eb524c9b030988f8e7c5:/lisp/gnus/gnus-sum.el diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 619c8bd75f..789308c4ab 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -7734,6 +7734,7 @@ If BACKWARD, the previous article is selected instead of the next." (point (with-current-buffer gnus-group-buffer (point))) + (current-summary (current-buffer)) (group (if (eq gnus-keep-same-level 'best) (gnus-summary-best-group gnus-newsgroup-name) @@ -7758,6 +7759,10 @@ If BACKWARD, the previous article is selected instead of the next." (gnus-summary-next-group nil group backward))) (t (when (gnus-key-press-event-p last-input-event) + ;; Somehow or other, we may now have selected a different + ;; window. Make point go back to the summary buffer. + (when (eq current-summary (current-buffer)) + (select-window (get-buffer-window current-summary))) (gnus-summary-walk-group-buffer gnus-newsgroup-name cmd unread backward point))))))))