Open XiaoGeMa opened 6 years ago
The first evil escape sequence character seems to be inserted here: https://github.com/syl20bnr/evil-escape/blob/f4e9116bfbaac8c9d210c17ad488e0982291245f/evil-escape.el#L184
(inserted (evil-escape--insert))
excluding the insertion in overwrite-mode
seems to stop the issue:
(inserted (unless overwrite-mode (evil-escape--insert)))
This can be tested by evaluating the function with the change:
(defun evil-escape-pre-command-hook ()
"evil-escape pre-command hook."
(with-demoted-errors "evil-escape: Error %S"
(when (evil-escape-p)
(let* ((modified (buffer-modified-p))
(inserted (unless overwrite-mode (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)
(cond
((and (characterp evt)
(or (and (equal (this-command-keys) (evil-escape--first-key))
(char-equal evt skey))
(and evil-escape-unordered-key-sequence
(equal (this-command-keys) (evil-escape--second-key))
(char-equal evt fkey))))
(evil-repeat-stop)
(let ((esc-fun (evil-escape-func)))
(when esc-fun
(setq this-command esc-fun)
(setq this-original-command esc-fun))))
((null evt))
(t (setq unread-command-events
(append unread-command-events (list evt)))))))))
Description :octocat:
overwrite mode error on pressing f
Reproduction guide :beetle:
Observed behaviour: :eyes: :broken_heart: the two charactors under and after the cursor will be replace by f. if I press any key otherwise, only one charactor under the cursor will be replaced. I'm not sure it's a bug or something meaningful I don't understand.
Expected behaviour: :heart: :smile: like press other keys.
System Info :computer:
Backtrace :paw_prints: