Skip to content

Commit 6ef7bc1

Browse files
committed
s:find_opening_paren: code style
1 parent 5a4cf72 commit 6ef7bc1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

indent/python.vim

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,13 @@ function! s:find_opening_paren(lnum, col)
118118
call cursor(a:lnum, a:col)
119119

120120
let nearest = [0, 0]
121+
let timeout = g:python_pep8_indent_searchpair_timeout
121122
for [p, maxoff] in items(s:paren_pairs)
122123
let stopline = max([0, line('.') - maxoff, nearest[0]])
123124
let found = 0
124125
while 1
125-
let next = searchpairpos(
126-
\ '\V'.p[0], '', '\V'.p[1], 'bnW', '', stopline, g:python_pep8_indent_searchpair_timeout)
127-
128-
if !next[0]
129-
break
130-
endif
131-
if !s:_skip_special_chars(next[0], next[1])
126+
let next = searchpairpos('\V'.p[0], '', '\V'.p[1], 'bnW', '', stopline, timeout)
127+
if !next[0] || !s:_skip_special_chars(next[0], next[1])
132128
break
133129
endif
134130
call cursor(next[0], next[1])

0 commit comments

Comments
 (0)