File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -131,17 +131,16 @@ function s:IsBlock()
131
131
if getline (line (' .' ))[col (' .' )-1 ] == ' {'
132
132
let l: ln = line (' .' )
133
133
if search (' \S' ,' bW' )
134
- let char = getline (line (' .' ))[col (' .' )-1 ]
135
- let prechar = getline (line (' .' ))[col (' .' )-2 ]
136
- let syn = synIDattr (synID (line (' .' ),col (' .' )-1 ,0 ),' name' )
137
- if char == ' /' && prechar == ' *' && syn = ~? ' comment'
138
- if ! (search (' \/\*' ,' bW' ) && search (' \S' ,' bW' ))
139
- return 1
140
- endif
134
+ while 1
141
135
let char = getline (line (' .' ))[col (' .' )-1 ]
142
136
let prechar = getline (line (' .' ))[col (' .' )-2 ]
143
137
let syn = synIDattr (synID (line (' .' ),col (' .' )-1 ,0 ),' name' )
144
- endif
138
+ if char != ' /' || prechar != ' *' || syn !~? ' comment'
139
+ break
140
+ elseif ! search (' \/\*' ,' bW' ) || ! search (' \S' ,' bW' )
141
+ return 1
142
+ endif
143
+ endwhile
145
144
if syn = ~? ' \%(xml\|jsx\)'
146
145
return char != ' {'
147
146
elseif char = ~# ' \l'
You can’t perform that action at this time.
0 commit comments