All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f196c5b)
Ref: https://github.com/Vimjas/vim-python-pep8-indent/issues/116
let g:python_pep8_indent_hang_closing = 0
endif
let g:python_pep8_indent_hang_closing = 0
endif
+" TODO: check required patch for timeout argument, likely lower than 7.3.429 though.
+if !exists('g:python_pep8_indent_searchpair_timeout')
+ if has('patch-8.0.1483')
+ let g:python_pep8_indent_searchpair_timeout = 150
+ else
+ let g:python_pep8_indent_searchpair_timeout = 0
+ endif
+endif
+
let s:block_rules = {
\ '^\s*elif\>': ['if', 'elif'],
\ '^\s*except\>': ['try', 'except'],
let s:block_rules = {
\ '^\s*elif\>': ['if', 'elif'],
\ '^\s*except\>': ['try', 'except'],
for [p, maxoff] in items(s:paren_pairs)
let stopline = max([0, line('.') - maxoff, nearest[0]])
let next = searchpairpos(
for [p, maxoff] in items(s:paren_pairs)
let stopline = max([0, line('.') - maxoff, nearest[0]])
let next = searchpairpos(
- \ '\V'.p[0], '', '\V'.p[1], 'bnW', s:skip_special_chars, stopline)
+ \ '\V'.p[0], '', '\V'.p[1], 'bnW', s:skip_special_chars, stopline, g:python_pep8_indent_searchpair_timeout)
if next[0] && (next[0] > nearest[0] || (next[0] == nearest[0] && next[1] > nearest[1]))
let nearest = next
endif
if next[0] && (next[0] > nearest[0] || (next[0] == nearest[0] && next[1] > nearest[1]))
let nearest = next
endif
if match_quotes != -1
" closing multiline string
let quotes = line[match_quotes:(match_quotes+2)]
if match_quotes != -1
" closing multiline string
let quotes = line[match_quotes:(match_quotes+2)]
- let pairpos = searchpairpos(quotes, '', quotes, 'b')
+ let pairpos = searchpairpos(quotes, '', quotes, 'b', 1, g:python_pep8_indent_searchpair_timeout)
if pairpos[0] != 0
return indent(pairpos[0])
else
if pairpos[0] != 0
return indent(pairpos[0])
else