Commit 2ef880cc authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

Don't try to jump to non-existent part (bug#28013)

* lisp/gnus/gnus-art.el (gnus-article-edit-part): Don't try to jump to
the next part if there is the only one part in the article (bug#28013).
parent 63b5a4a6
......@@ -5058,11 +5058,14 @@ and `gnus-mime-delete-part', and not provided at run-time normally."
(gnus-article-edit-done))
(gnus-configure-windows 'article)
(sit-for 0)
(when (and current-id (integerp gnus-auto-select-part))
(gnus-article-jump-to-part
(min (max (+ current-id gnus-auto-select-part) 1)
(with-current-buffer gnus-article-buffer
(length gnus-article-mime-handle-alist)))))))
(let ((handles (with-current-buffer gnus-article-buffer
gnus-article-mime-handle-alist)))
;; `handles' will be nil if there is the only one part
;; in the article and is deleted.
(when (and handles current-id (integerp gnus-auto-select-part))
(gnus-article-jump-to-part
(min (max (+ current-id gnus-auto-select-part) 1)
(length handles)))))))
(defun gnus-mime-replace-part (file)
"Replace MIME part under point with an external body."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment