From 9257ed0427f7aaf95fd6cf0a27c684e8c6d1e433 Mon Sep 17 00:00:00 2001 From: Kien Nguyen Date: Thu, 4 Jul 2019 09:08:32 +0900 Subject: [PATCH] Don't redisplay and font locking while doing evil-escape This merges https://github.com/syl20bnr/evil-escape/pull/91. @hlissner merged this into his fork, so I assume it is good. --- evil-escape.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/evil-escape.el b/evil-escape.el index a3977ce..b47e9ad 100644 --- a/evil-escape.el +++ b/evil-escape.el @@ -180,13 +180,16 @@ If any of these functions return non nil, evil escape will be inhibited." "evil-escape pre-command hook." (with-demoted-errors "evil-escape: Error %S" (when (evil-escape-p) - (let* ((modified (buffer-modified-p)) + ;; Don't inhibit redisplay, else visual mode j key will not be updated. + (let* ((inhibit-redisplay nil) + (fontification-functions nil) + (modified (buffer-modified-p)) (inserted (evil-escape--insert)) (fkey (elt evil-escape-key-sequence 0)) (skey (elt evil-escape-key-sequence 1)) (evt (read-event nil nil evil-escape-delay))) (when inserted (evil-escape--delete)) - (set-buffer-modified-p modified) + (restore-buffer-modified-p modified) (cond ((and (characterp evt) (or (and (equal (this-command-keys) (evil-escape--first-key))