Skip to content

Commit 9116b51

Browse files
authored
indent: fix regex in IsCommentLine
backslashes need to be escaped: ```vim echo match("test", "\S") " -> -1 echo match("test", "\\S") " -> 0 ``` this may fix #112
1 parent 1fa1765 commit 9116b51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indent/swift.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ endfunction
4949

5050
function! s:IsCommentLine(lnum)
5151
return synIDattr(synID(a:lnum,
52-
\ match(getline(a:lnum), "\S") + 1, 0), "name")
52+
\ match(getline(a:lnum), "\\S") + 1, 0), "name")
5353
\ ==# "swiftComment"
5454
endfunction
5555

0 commit comments

Comments
 (0)