summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasmin Patry <jasmin.patry@gmail.com>2015-09-06 18:28:45 -0700
committerJasmin Patry <jasmin.patry@gmail.com>2015-09-13 15:46:04 -0700
commit4c5e3bf0bca351cfc06cee5b0bd58afbf96f9d70 (patch)
treeabbb452d4bde09c107091d3433920daf43701d04
parent18a33859d7cddf31b4605414fdb34ea810779e22 (diff)
Fix indentation of surrounded lines
When surrounding a set of lines (using a command like 'Vjjs{' in cc-mode, for example), only the first line was correctly indented. This commit fixes evil-surround-region so that all the selected lines are properly indented after being surrounded.
-rwxr-xr-xevil-surround.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/evil-surround.el b/evil-surround.el
index 4a8aaf5..1a16843 100755
--- a/evil-surround.el
+++ b/evil-surround.el
@@ -294,8 +294,8 @@ Becomes this:
((eq type 'line)
(insert open)
- (indent-according-to-mode)
(newline-and-indent)
+ (indent-region (overlay-start overlay) (overlay-end overlay))
(goto-char (overlay-end overlay))
(insert close)
(indent-according-to-mode)