We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent585b369 commit02a6e69Copy full SHA for 02a6e69
autoload/pymode/folding.vim
@@ -228,17 +228,11 @@ fun! s:BlockStart(lnum) "{{{
228
" W: don't Wrap around the end of the file
229
let previous_definition=searchpos(s:def_regex,'bnW')
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
-callcursor(previous_definition[0]-1,0)
240
-endwhile
241
-endif
+while previous_definition[0]!=1&& previous_definition!= [0,0]
+\&&indent(previous_definition[0])>=l:inferred_indent
+let previous_definition=searchpos(s:def_regex,'bnW')
+callcursor(previous_definition[0]-1,0)
+endwhile
242
let last_def= previous_definition[0]
243
if last_def
244
callcursor(last_def,0)