From 3d8e81b7e132629c2f16eb99338084cc1a8ffe81 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Fri, 21 Sep 2018 00:40:48 +0800 Subject: [PATCH] Delete doom-modeline-magit-post-refresh due to the performance issue. Workaround: Revert the buffers manually. (setq auto-revert-check-vc-info t) brings the same performance issue. Refer to: https://github.com/magit/magit/issues/2687 https://magit.vc/manual/magit/The-mode_002dline-information-isn_0027t-always-up_002dto_002ddate.html --- doom-modeline.el | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/doom-modeline.el b/doom-modeline.el index e8f6b39..efaee16 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -688,18 +688,6 @@ directory, the file name, and its state (modified, read-only or non-existent)." (add-hook 'after-save-hook #'doom-modeline--update-vcs) (add-hook 'find-file-hook #'doom-modeline--update-vcs t) -(defun doom-modeline-magit-post-refresh () - "Update vcs state in mode-line after refreshing in magit." - (dolist (buf (buffer-list)) - (when (and (not (buffer-modified-p buf)) - (buffer-file-name buf) - (file-exists-p (buffer-file-name buf)) - (file-in-directory-p (buffer-file-name buf) (magit-toplevel))) - (with-current-buffer buf - (vc-refresh-state) - (doom-modeline--update-vcs))))) -(add-hook 'magit-post-refresh-hook #'doom-modeline-magit-post-refresh) - (doom-modeline-def-segment vcs "Displays the current branch, colored based on its state." (if (doom-modeline--active)