File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -35,29 +35,29 @@ fun! pymode#folding#expr(lnum) "{{{
35
35
36
36
let line = getline (a: lnum )
37
37
let indent = indent (a: lnum )
38
- let prev_line = getline (a: lnum - 1 )
38
+ let prev_line = getline (a: lnum - 1 )
39
39
40
40
if line = ~ s: def_regex || line = ~ s: decorator_regex
41
- if prev_line = ~ s: decorator_regex
42
- return ' ='
43
- else
44
- return " >" .(indent / &shiftwidth + 1 )
45
- endif
41
+ if prev_line = ~ s: decorator_regex
42
+ return ' ='
43
+ else
44
+ return " >" .(indent / &shiftwidth + 1 )
45
+ endif
46
46
endif
47
47
48
- if line = ~ s: doc_begin_regex
49
- \ && line !~ s: doc_line_regex
50
- \ && prev_line = ~ s: def_regex
51
- return " >" .(indent / &shiftwidth + 1 )
48
+ if line = ~ s: doc_begin_regex && line !~ s: doc_line_regex && prev_line = ~ s: def_regex
49
+ return " >" .(indent / &shiftwidth + 1 )
52
50
endif
53
51
54
- if line = ~ s: doc_end_regex
55
- \ && line !~ s: doc_line_regex
56
- return " <" .(indent / &shiftwidth + 1 )
52
+ if line = ~ s: doc_end_regex && line !~ s: doc_line_regex
53
+ return " <" .(indent / &shiftwidth + 1 )
57
54
endif
58
55
59
56
if line = ~ s: blank_regex
60
57
if prev_line = ~ s: blank_regex
58
+ if indent (a: lnum + 1 ) == 0 && getline (a: lnum + 1 ) !~ s: blank_regex
59
+ return 0
60
+ endif
61
61
return -1
62
62
else
63
63
return ' ='
You can’t perform that action at this time.
0 commit comments