From 4a1bd9e173d91164d5abe6f2e349a447eaf019d7 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Wed, 17 May 2023 19:48:02 -0700 Subject: [PATCH 1/5] [5.6] Fix buffer-mismatch bug in erc-scroll-to-bottom * lisp/erc/erc-goodies.el (erc-scroll-to-bottom): Only `recenter' when the selected window's buffer is current. Previously, the module `scrolltobottom' signaled an "Error in `post-command-hook'" when a user clicked a channel indicator in the mode line from a window showing another ERC buffer. --- lisp/erc/erc-goodies.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index 01eae4b63c5..87c95778523 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -92,6 +92,7 @@ erc-scroll-to-bottom (save-restriction (widen) (when (and erc-insert-marker + (eq (current-buffer) (window-buffer)) ;; we're editing a line. Scroll. (> (point) erc-insert-marker)) (save-excursion -- 2.40.0