Skip to content

Commit c330d0c

Browse files
committed
Inline s:skip_search
1 parent 8d64e05 commit c330d0c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

indent/python.vim

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ if has('conceal')
7777
endif
7878

7979

80-
let s:skip_search = 'synIDattr(synID(line("."), col("."), 0), "name") ' .
81-
\ '=~? "comment"'
82-
8380
" Use 'shiftwidth()' instead of '&sw'.
8481
" (Since Vim patch 7.3.629, 'shiftwidth' can be set to 0 to follow 'tabstop').
8582
if exists('*shiftwidth')
@@ -104,7 +101,9 @@ function! s:find_opening_paren(...)
104101
endif
105102

106103
" Return if cursor is in a comment.
107-
exe 'if' s:skip_search '| return [0, 0] | endif'
104+
if synIDattr(synID(line('.'), col('.'), 0), 'name') =~? 'comment'
105+
return [0, 0]
106+
endif
108107

109108
let nearest = [0, 0]
110109
for [p, maxoff] in items(s:paren_pairs)

0 commit comments

Comments
 (0)