Skip to content

Commit

Permalink
Don't break deft-mode
Browse files Browse the repository at this point in the history
Deft-mode uses a read-only buffer with a custom bound insertion function.
Before this one could not type the first character of the escape sequence in any note filter.
  • Loading branch information
trishume committed Apr 15, 2015
1 parent cf3e186 commit 05d9e5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion evil-escape.el
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,12 @@ with a key sequence."
(when (not buffer-read-only) (delete-char -1)))

(defun evil-escape--insert-state-delete-func ()
"Take care of term-mode."
"Take care of term-mode and other weird modes."
(interactive)
(cond ((eq 'term-mode major-mode)
(call-interactively 'term-send-backspace))
((eq 'deft-mode major-mode)
(call-interactively 'deft-filter-increment))
(t (evil-escape--default-delete-func))))

(defun evil-escape--escape-with-q ()
Expand Down

0 comments on commit 05d9e5f

Please sign in to comment.