]> code.delx.au - gnu-emacs/commitdiff
Fix problems caused by calling 'recenter' in auto-revert (Bug#20122)
authorMario Lang <mlang@delysid.org>
Fri, 6 Jun 2014 00:39:22 +0000 (02:39 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 21 Mar 2015 10:01:27 +0000 (12:01 +0200)
 lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
 `recenter' if `current-buffer' is equal to `window-buffer'.

(cherry picked from commit 4a8160204325c4b955647fe9e0a944c1f8c705dd)

lisp/ChangeLog
lisp/emacs-lisp/tabulated-list.el

index 5c72fbdf29182bc8c79d0d2c1b1477ba10289dc5..301c52d410d08f213adc21fa667f693fd8888121 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-06  Mario Lang  <mlang@delysid.org>
+
+       * emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
+       `recenter' if `current-buffer' is equal to `window-buffer'.
+
 2015-03-20  Dmitry Gutov  <dgutov@yandex.ru>
 
        * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): Detect
index 933567db99362461768df211715f057e3286a11d..15a0914cb17e82551d2102738a733011b5d39f30 100644 (file)
@@ -323,7 +323,8 @@ to the entry with the same ID element as the current line."
     (if saved-pt
        (progn (goto-char saved-pt)
               (move-to-column saved-col)
-              (recenter))
+              (when (eq (window-buffer) (current-buffer))
+                (recenter)))
       (goto-char (point-min)))))
 
 (defun tabulated-list-print-entry (id cols)