diff options
Diffstat (limited to 'indent/swift.vim')
-rw-r--r-- | indent/swift.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indent/swift.vim b/indent/swift.vim index 773e6451..92df0fc8 100644 --- a/indent/swift.vim +++ b/indent/swift.vim @@ -51,7 +51,7 @@ endfunction function! s:IsCommentLine(lnum) return synIDattr(synID(a:lnum, - \ match(getline(a:lnum), "\S") + 1, 0), "name") + \ match(getline(a:lnum), "\\S") + 1, 0), "name") \ ==# "swiftComment" endfunction @@ -227,8 +227,8 @@ function! SwiftIndent(...) if numOpenParens > 0 let savePosition = getcurpos() " Must be at EOL because open paren has to be above (left of) the cursor - call cursor(previousNum, col("$")) - let previousParen = searchpair("(", "", ")", "bWn", "s:IsExcludedFromIndent()") + call cursor(previousNum, [previousNum, col("$")]) + let previousParen = searchpair("(", "", ")", "cbWn", "s:IsExcludedFromIndent()") call setpos(".", savePosition) return indent(previousParen) + shiftwidth() endif |