diff options
| author | Tim Harper <timcharper@gmail.com> | 2012-03-27 11:41:56 -0600 |
|---|---|---|
| committer | Tim Harper <timcharper@gmail.com> | 2012-03-27 11:47:58 -0600 |
| commit | 97d1f82e95c33a12af37fa594e37e3ce059be2ce (patch) | |
| tree | e4b340e4ff27a951340cd144f3acaf7b18eb9f8e | |
| parent | 627d1e69eaafaeedaa448e13804d735eb3282881 (diff) | |
Don't trim outer whitespace
Conformant with vim, evil recently made text objects a' or a" include
outer whitespace. Since evil-surround piggy-backs on evil text-objects,
cs'" would have the following effect:
aaa 'bbb' cccc
=>
aaa"bbb"cccc
This commit causes evil-surround to always shrink the outer range such
that it no longer contains whitespace.
Fixes #11
| -rw-r--r-- | surround.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/surround.el b/surround.el index 824da99..0a25067 100644 --- a/surround.el +++ b/surround.el @@ -101,6 +101,7 @@ See also `surround-inner-overlay'." (when (functionp outer) (setq outer (funcall outer)) (when (evil-range-p outer) + (surround-trim-whitespace-from-range outer "[ \t]") (setq outer (make-overlay (evil-range-beginning outer) (evil-range-end outer) nil nil t)))))) |
