File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -256,13 +256,19 @@ endfunction
256256
257257function s: DoWhile ()
258258 let cpos = searchpos (' \m\<' ,' cbW' )
259- if s: SearchLoop (' \C[{}]\|\<\%(do\|while\)\>' ,' bW' ,s: skip_expr )
260- if s: {s: LookingAt () == ' }' && s: GetPair (' {' ,' }' ,' bW' ,s: skip_expr ) ?
261- \ ' Previous' : ' ' }Token () == # ' do' && s: IsBlock ()
262- return 1
259+ while s: SearchLoop (' \C[{}]\|\<\%(do\|while\)\>' ,' bW' ,s: skip_expr )
260+ if s: LookingAt () = ~ ' \a'
261+ if s: Pure (' s:IsBlock' )
262+ if s: LookingAt () == # ' d'
263+ return 1
264+ endif
265+ break
266+ endif
267+ elseif s: LookingAt () != ' }' || ! s: GetPair (' {' ,' }' ,' bW' ,s: skip_expr )
268+ break
263269 endif
264- call call ( ' cursor ' ,cpos)
265- endif
270+ endwhile
271+ call call ( ' cursor ' ,cpos)
266272endfunction
267273
268274" returns total offset from braceless contexts. 'num' is the lineNr which
You can’t perform that action at this time.
0 commit comments