mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Make evil backspace/DEL respect delete-selection-mode
Perhaps this should be fixed upstream?
This commit is contained in:
@ -161,6 +161,13 @@ directives. By default, this only recognizes C directives.")
|
||||
(advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a)
|
||||
(advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a)
|
||||
|
||||
;; Fix backspace/DEL commands not respecting `delete-selection-mode'
|
||||
(defadvice! +evil-delete-region-if-mark-a (orig-fn &rest args)
|
||||
:around '(evil-delete-backward-word evil-delete-backward-char-and-join)
|
||||
(if (and (bound-and-true-p delete-selection-mode) mark-active)
|
||||
(call-interactively #'backward-delete-char-untabify)
|
||||
(apply orig-fn args)))
|
||||
|
||||
;; Recenter screen after most searches
|
||||
(dolist (fn '(evil-visualstar/begin-search-forward
|
||||
evil-visualstar/begin-search-backward
|
||||
|
Reference in New Issue
Block a user