File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 447447 ,@(when evil-want-C-u-delete
448448 '((" \C -u" . evil-delete-back-to-indentation)))
449449 ,@(when evil-want-C-h-delete
450- '((" \C -h" . evil-delete-backward-char-and-join )))
450+ '((" \C -h" . evil--call-del-binding )))
451451 ([mouse-2] . mouse-yank-primary))
452452 " Evil's bindings for insert & replace states.
453453Used in `evil-insert-state-map' and `evil-replace-state-map' ,
Original file line number Diff line number Diff line change @@ -574,6 +574,13 @@ ubiquity of prefix arguments."
574574 'evil-search-yank-word ))
575575 (define-key evil-ex-search-keymap (kbd " C-w" ) nil ))))))
576576
577+ (defun evil--call-del-binding ()
578+ " Call the same function as the DEL binding."
579+ (interactive )
580+ (let ((del-binding (key-binding (kbd " DEL" ))))
581+ (when del-binding
582+ (funcall del-binding))))
583+
577584(defcustom evil-want-C-h-delete nil
578585 " Whether `C-h' deletes a char in Insert state."
579586 :type 'boolean
@@ -591,7 +598,7 @@ ubiquity of prefix arguments."
591598 ((and value
592599 (not (lookup-key evil-insert-state-map (kbd " C-h" ))))
593600 (define-key evil-insert-state-map (kbd " C-h" )
594- 'evil-delete-backward-char-and-join )
601+ 'evil--call-del-binding )
595602 (define-key evil-replace-state-map (kbd " C-h" )
596603 'evil-replace-backspace ))))))
597604
You can’t perform that action at this time.
0 commit comments