Add emacs mode checks to insert mode checks
This is to accommodate users who default to emacs mode, rather than insert mode. The two are also very alike, so many of these checks should apply to both (almost) equally.
This commit is contained in:
parent
8edabbecfa
commit
d149c59d2e
4 changed files with 13 additions and 5 deletions
|
@ -121,7 +121,8 @@ more information on modifiers."
|
|||
(defun +evil--insert-newline-below-and-respect-comments-a (orig-fn count)
|
||||
(if (or (not +evil-want-o/O-to-continue-comments)
|
||||
(not (eq this-command 'evil-open-below))
|
||||
(evil-insert-state-p))
|
||||
(evil-insert-state-p)
|
||||
(evil-emacs-state-p))
|
||||
(funcall orig-fn count)
|
||||
(letf! (defun evil-insert-newline-below () (+evil--insert-newline))
|
||||
(let ((evil-auto-indent evil-auto-indent))
|
||||
|
@ -131,7 +132,8 @@ more information on modifiers."
|
|||
(defun +evil--insert-newline-above-and-respect-comments-a (orig-fn count)
|
||||
(if (or (not +evil-want-o/O-to-continue-comments)
|
||||
(not (eq this-command 'evil-open-above))
|
||||
(evil-insert-state-p))
|
||||
(evil-insert-state-p)
|
||||
(evil-emacs-state-p))
|
||||
(funcall orig-fn count)
|
||||
(letf! (defun evil-insert-newline-above () (+evil--insert-newline 'above))
|
||||
(let ((evil-auto-indent evil-auto-indent))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue