fix(eval): lookup RET binding in insert if evil
Otherwise, if the REPL was not in insert mode the send-to-buffer would fail.
This commit is contained in:
parent
3a34894492
commit
9d4d5b756a
1 changed files with 6 additions and 1 deletions
|
@ -136,7 +136,12 @@ immediately after."
|
||||||
;; current REPL uses comint. Even if it did, no telling if they
|
;; current REPL uses comint. Even if it did, no telling if they
|
||||||
;; have their own `comint-send-input' wrapper, so to be safe, I
|
;; have their own `comint-send-input' wrapper, so to be safe, I
|
||||||
;; simply emulate the keypress.
|
;; simply emulate the keypress.
|
||||||
(call-interactively (doom-lookup-key (kbd "RET"))))
|
(call-interactively
|
||||||
|
(if (bound-and-true-p evil-local-mode)
|
||||||
|
(evil-save-state
|
||||||
|
(evil-insert-state)
|
||||||
|
(doom-lookup-key (kbd "RET")))
|
||||||
|
(doom-lookup-key (kbd "RET")))))
|
||||||
(sit-for 0.001)
|
(sit-for 0.001)
|
||||||
(redisplay 'force)))
|
(redisplay 'force)))
|
||||||
(when (and (eq origin-window (selected-window))
|
(when (and (eq origin-window (selected-window))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue