From 6ef7bc19a5e7e29b256b2f3c009e73e405945239 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 16 Nov 2018 14:53:53 +0100 Subject: [PATCH 1/1] s:find_opening_paren: code style --- indent/python.vim | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/indent/python.vim b/indent/python.vim index 2797fdb..cc9d6c2 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -118,17 +118,13 @@ function! s:find_opening_paren(lnum, col) call cursor(a:lnum, a:col) let nearest = [0, 0] + let timeout = g:python_pep8_indent_searchpair_timeout for [p, maxoff] in items(s:paren_pairs) let stopline = max([0, line('.') - maxoff, nearest[0]]) let found = 0 while 1 - let next = searchpairpos( - \ '\V'.p[0], '', '\V'.p[1], 'bnW', '', stopline, g:python_pep8_indent_searchpair_timeout) - - if !next[0] - break - endif - if !s:_skip_special_chars(next[0], next[1]) + let next = searchpairpos('\V'.p[0], '', '\V'.p[1], 'bnW', '', stopline, timeout) + if !next[0] || !s:_skip_special_chars(next[0], next[1]) break endif call cursor(next[0], next[1]) -- 2.39.5