Skip to content

Commit ea76118

Browse files
committed
1 parent f8cdd89 commit ea76118

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

autoload/pymode/folding.vim

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,29 @@ fun! pymode#folding#expr(lnum) "{{{
3535

3636
let line = getline(a:lnum)
3737
let indent = indent(a:lnum)
38-
let prev_line = getline(a:lnum - 1)
38+
let prev_line = getline(a:lnum - 1)
3939

4040
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
4646
endif
4747

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)
5250
endif
5351

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)
5754
endif
5855

5956
if line =~ s:blank_regex
6057
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
6161
return -1
6262
else
6363
return '='

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy