Fix #223 Changing buffers causes periodic recentering

This commit is contained in:
syl20bnr 2014-12-10 23:23:51 -05:00
parent eba0f1a565
commit afac4e9505

View file

@ -52,6 +52,19 @@
;; use C-u as scroll-up
(setq-default evil-want-C-u-scroll t)
;; Hack to fix a bug with tabulated-list.el
;; see: http://redd.it/2dgy52
(defun tabulated-list-revert (&rest ignored)
"The `revert-buffer-function' for `tabulated-list-mode'.
It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
(interactive)
(unless (derived-mode-p 'tabulated-list-mode)
(error "The current buffer is not in Tabulated List mode"))
(run-hooks 'tabulated-list-revert-hook)
;; hack is here
;; (tabulated-list-print t)
(tabulated-list-print))
;; ---------------------------------------------------------------------------
;; Edit
;; ---------------------------------------------------------------------------