Fix expand-region misplacing cursor on cancel/C-g #317

This commit is contained in:
Henrik Lissner 2018-01-02 13:50:35 -05:00
parent 50c1ad0875
commit 92e52fafd1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -223,7 +223,12 @@ extension, try to guess one."
command-log-mode-open-log-turns-on-mode t)) command-log-mode-open-log-turns-on-mode t))
(def-package! expand-region (def-package! expand-region
:commands (er/expand-region er/contract-region er/mark-symbol er/mark-word)) :commands (er/expand-region er/contract-region er/mark-symbol er/mark-word)
:config
(defun doom*quit-expand-region ()
(when (memq last-command '(er/expand-region er/contract-region))
(er/contract-region 0)))
(advice-add #'evil-escape :before #'doom*quit-expand-region))
(def-package! help-fns+ ; Improved help commands (def-package! help-fns+ ; Improved help commands
:commands (describe-buffer describe-command describe-file :commands (describe-buffer describe-command describe-file