File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -228,17 +228,11 @@ fun! s:BlockStart(lnum) "{{{
228
228
" W: don't Wrap around the end of the file
229
229
let previous_definition = searchpos (s: def_regex , ' bnW' )
230
230
231
- " Corner case of function being defined on the first line.
232
- if previous_definition[0 ] == 1
233
- " Just skip the while loop.
234
- elseif previous_definition != [0 , 0 ]
235
- " Lines that are blank have zero indent.
236
- while previous_definition != [0 , 0 ]
237
- \ && indent (previous_definition[0 ]) >= l: inferred_indent
238
- let previous_definition = searchpos (s: def_regex , ' bnW' )
239
- call cursor (previous_definition[0 ] - 1 , 0 )
240
- endwhile
241
- endif
231
+ while previous_definition[0 ] != 1 && previous_definition != [0 , 0 ]
232
+ \ && indent (previous_definition[0 ]) >= l: inferred_indent
233
+ let previous_definition = searchpos (s: def_regex , ' bnW' )
234
+ call cursor (previous_definition[0 ] - 1 , 0 )
235
+ endwhile
242
236
let last_def = previous_definition[0 ]
243
237
if last_def
244
238
call cursor (last_def, 0 )
You can’t perform that action at this time.
0 commit comments