Skip to content

Commit

Permalink
Don't redisplay and font locking while doing evil-escape
Browse files Browse the repository at this point in the history
This merges syl20bnr#91.
@hlissner merged this into his fork, so I assume it is good.
  • Loading branch information
kiennq authored and tarsius committed Nov 22, 2023
1 parent 1c8fc8b commit 9257ed0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions evil-escape.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9257ed0

Please sign in to comment.