Eliminated lags when navigating diff file cause by visiting files behind the
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 16 Nov 2020 00:32:43 +0200
changeset 1633 d31f7473a4b1
parent 1632 9189d278b075
child 1634 1c19f4e2ac19
Eliminated lags when navigating diff file cause by visiting files behind the scene in order to get proper highlighting. This generates calls to `vc-git-find-revision` and spawn 2 git processes. Noticeably slow on Cygwin.
.emacs-my
--- a/.emacs-my	Sun Nov 01 15:05:04 2020 +0200
+++ b/.emacs-my	Mon Nov 16 00:32:43 2020 +0200
@@ -2575,6 +2575,8 @@
 
 ;; Since 27.1 it is enabled during font-lock. Need to disable explicitly.
 (setq diff-refine nil)
+;; https://emacs.stackexchange.com/questions/61760/lags-when-navigating-vc-root-diff-buffer/
+(setq diff-font-lock-syntax 'hunk-only)
 
 (when (and window-system (< emacs-major-version 26))
   (my--eval-after-load diff-mode