From 8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 27 Sep 2017 19:57:29 +0200 Subject: Update --- indent/swift.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indent/swift.vim') 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 -- cgit v1.2.3