Skip to content

Commit

Permalink
Merge syl20bnr#91
Browse files Browse the repository at this point in the history
Fixes syl20bnr#84

Co-authored-by: kiennq <[email protected]>
  • Loading branch information
hlissner and kiennq committed May 2, 2020
1 parent 784acd3 commit 2c24674
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions evil-escape.el
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,21 @@ with a key sequence."
"evil-escape pre-command hook."
(with-demoted-errors "evil-escape: Error %S"
(when (evil-escape-p)
(let* ((modified (buffer-modified-p))
(let* (;; NOTE Add syl20bnr/evil-escape#91: inhibit redisplay and
;; refontification after a `read-event'.
(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)
;; NOTE Add syl20bnr/evil-escape#91: replace `set-buffer-modified-p'
;; with `restore-buffer-modified-p', which doesn't redisplay the
;; modeline after changing the buffer's modified state.
(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 2c24674

Please sign in to comment.