8000 Merge pull request #595 from wilywampa/class_folding · python-mode/python-mode@73d54e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 73d54e6

Browse files
committed
Merge pull request #595 from wilywampa/class_folding
Fix folding after blank line in class/def
2 parents 755e99f + fa6322e commit 73d54e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/pymode/folding.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fun! pymode#folding#expr(lnum) "{{{
5151

5252
if line =~ s:def_regex
5353
" single line def
54-
if indent(a:lnum) >= indent(a:lnum+1)
54+
if indent(a:lnum) >= indent(a:lnum+1) && getline(prevnonblank(a:lnum)) !~ ':\s*$'
5555
return '='
5656
endif
5757
" Check if last decorator is before the last def

0 commit comments

Comments
 (0)
0