File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ fun! s:BlockStart(lnum) "{{{
200200
201201 " Now find the class/def one shiftwidth lower than the start of the
202202 " aforementioned indent block.
203- if next_stmt_at_def_indent && a: lnum <= next_stmt_at_def_indent
203+ if next_stmt_at_def_indent && next_stmt_at_def_indent < a: lnum
204204 let max_indent = max ([indent (next_stmt_at_def_indent) - &shiftwidth , 0 ])
205205 else
206206 let max_indent = max ([indent (prevnonblank (a: lnum )) - &shiftwidth , 0 ])
@@ -211,14 +211,6 @@ endfunction "}}}
211211fun ! s: BlockEnd (lnum) " {{{
212212 " Note: Make sure to reset cursor position after using this function.
213213 call cursor (a: lnum , 0 )
214- " Regex translation:
215- " \v: very magic
216- " \s: any space char
217- " {...}: zero to more as many as possible
218- " \S: non whitespace
219- " index [0]: gets the line returned by searchpos
220- " flag 'n': do not move cursor
221- " flag 'W': don't wrap around the end of the file
222214 return searchpos (' \v^\s{,' .indent (' .' ).' }\S' , ' nW' )[0 ] - 1
223215endfunction " }}}
224216
Original file line number Diff line number Diff line change 11" vi: fdl = 1
2- let g: pymode_version = " 0.8.1 "
2+ let g: pymode_version = " 0.9.0 "
33
44com ! PymodeVersion echomsg " Current python-mode version: " . g: pymode_version
55com ! PymodeTroubleshooting call pymode#troubleshooting#test ()
@@ -39,7 +39,8 @@ call pymode#default("g:pymode_folding", 1)
3939" Maximum file length to check for nested class/def statements
4040call pymode#default (" g:pymode_folding_nest_limit" , 1000 )
4141" Change for folding customization (by example enable fold for 'if', 'for')
42- call pymode#default (" g:pymode_folding_regex" , ' ^\s*\%(class\|def\) \w\+' )
42+ call pymode#default (" g:pymode_folding_regex" , ' ^\s*\%(class\|def\|async\s\+def\) .\+\(:\s\+\w\)\@!' )
43+
4344
4445" Enable/disable python motion operators
4546call pymode#default (" g:pymode_motion" , 1 )
@@ -314,4 +315,3 @@ endif
314315command ! PymodeVersion echomsg " Pymode version: " . g: pymode_version . " interpreter: " . g: pymode_python . " lint: " . g: pymode_lint . " rope: " . g: pymode_rope
315316
316317augroup pymode
317-
You can’t perform that action at this time.
0 commit comments