Skip to content

Commit 8a0dacb

Browse files
author
Keith Smiley
authored
Merge pull request #120 from brianlheim/patch-1
indent: fix indenting within parens
2 parents 1eaba53 + 3cb2283 commit 8a0dacb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indent/swift.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ function! SwiftIndent(...)
225225
if numOpenParens > 0
226226
let savePosition = getcurpos()
227227
" Must be at EOL because open paren has to be above (left of) the cursor
228-
call cursor(previousNum, col("$"))
229-
let previousParen = searchpair("(", "", ")", "bWn", "s:IsExcludedFromIndent()")
228+
call cursor(previousNum, [previousNum, col("$")])
229+
let previousParen = searchpair("(", "", ")", "cbWn", "s:IsExcludedFromIndent()")
230230
call setpos(".", savePosition)
231231
return indent(previousParen) + shiftwidth()
232232
endif

0 commit comments

Comments
 (0)