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) "{{{
200
200
201
201
" Now find the class/def one shiftwidth lower than the start of the
202
202
" 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
204
204
let max_indent = max ([indent (next_stmt_at_def_indent) - &shiftwidth , 0 ])
205
205
else
206
206
let max_indent = max ([indent (prevnonblank (a: lnum )) - &shiftwidth , 0 ])
@@ -211,14 +211,6 @@ endfunction "}}}
211
211
fun ! s: BlockEnd (lnum) " {{{
212
212
" Note: Make sure to reset cursor position after using this function.
213
213
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
222
214
return searchpos (' \v^\s{,' .indent (' .' ).' }\S' , ' nW' )[0 ] - 1
223
215
endfunction " }}}
224
216
Original file line number Diff line number Diff line change 1
1
" vi: fdl = 1
2
- let g: pymode_version = " 0.8.1 "
2
+ let g: pymode_version = " 0.9.0 "
3
3
4
4
com ! PymodeVersion echomsg " Current python-mode version: " . g: pymode_version
5
5
com ! PymodeTroubleshooting call pymode#troubleshooting#test ()
@@ -39,7 +39,8 @@ call pymode#default("g:pymode_folding", 1)
39
39
" Maximum file length to check for nested class/def statements
40
40
call pymode#default (" g:pymode_folding_nest_limit" , 1000 )
41
41
" 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
+
43
44
44
45
" Enable/disable python motion operators
45
46
call pymode#default (" g:pymode_motion" , 1 )
@@ -314,4 +315,3 @@ endif
314
315
command ! PymodeVersion echomsg " Pymode version: " . g: pymode_version . " interpreter: " . g: pymode_python . " lint: " . g: pymode_lint . " rope: " . g: pymode_rope
315
316
316
317
augroup pymode
317
-
You can’t perform that action at this time.
0 commit comments