diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2023-09-17 17:41:34 +0200 |
|---|---|---|
| committer | Tom Dalziel <tom_dl@hotmail.com> | 2023-09-17 17:41:34 +0200 |
| commit | bd98f7f5492446885dc4c6b0a7579c75c22ac829 (patch) | |
| tree | 7aa4177a10dd25d001b0cbf585d3dc0362d7c17c /evil-surround.el | |
| parent | 0d860be74165ceb8314742e4191cdad693f40a6d (diff) | |
Return an empty range from evil-surround-edit
This fixes a bug with evil-cleverparens where evil-cp-delete
tries to call evil-delete with the range, deleting too much text
if the point isn't on the opening paren.
Diffstat (limited to 'evil-surround.el')
| -rw-r--r-- | evil-surround.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/evil-surround.el b/evil-surround.el index aa7348f..b68329d 100644 --- a/evil-surround.el +++ b/evil-surround.el @@ -407,7 +407,9 @@ Otherwise call `evil-surround-region'." (call-interactively 'evil-surround-delete)) (t (evil-surround-setup-surround-line-operators) - (evil-surround-call-with-repeat 'evil-surround-region)))) + (evil-surround-call-with-repeat 'evil-surround-region))) + ;; Return an empty range so evil-motion-range doesn't try to guess + (let ((p (point))) (list p p 'exclusive))) (evil-define-command evil-Surround-edit (operation) "Like evil-surround-edit, but for surrounding with additional new-lines. |
