forked from aniani/vim
runtime(indent-tests): Annotate timed "search*()"es for tracing
related: #17116 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
fe8508eda0
commit
4e3df44aa2
@@ -20,10 +20,12 @@ let g:python_indent = extend(get(g:, 'python_indent', {}), #{
|
||||
let s:maxoff = 50 " maximum number of lines to look backwards for ()
|
||||
|
||||
function s:SearchBracket(fromlnum, flags)
|
||||
" VIM_INDENT_TEST_TRACE_START
|
||||
return searchpairpos('[[({]', '', '[])}]', a:flags,
|
||||
\ {-> synstack('.', col('.'))
|
||||
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
|
||||
\ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
|
||||
" VIM_INDENT_TEST_TRACE_END python#s:SearchBracket
|
||||
endfunction
|
||||
|
||||
" See if the specified line is already user-dedented from the expected value.
|
||||
|
Reference in New Issue
Block a user