diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-27 19:57:29 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-27 19:57:29 +0200 |
commit | 8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8 (patch) | |
tree | 125734ac66307a962eeda16283355dde0d0fbd2e /indent/swift.vim | |
parent | 9bfde7574aa89a91b80ed9c993fc000cfc11aae7 (diff) | |
download | vim-polyglot-8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8.tar.gz vim-polyglot-8b3418cab8eb5267b3a5743e4d5fe5f698d48bc8.zip |
Update
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 |