Skip to content

Commit 5fc36c0

Browse files
committed
Inline s:skip_search
1 parent 0586a51 commit 5fc36c0

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
@@ -94,9 +94,6 @@ if get(g:, 'python_pep8_indent_skip_concealed', 0)
9494
endif
9595

9696

97-
let s:skip_search = 'synIDattr(synID(line("."), col("."), 0), "name") ' .
98-
\ '=~? "comment"'
99-
10097
" Use 'shiftwidth()' instead of '&sw'.
10198
" (Since Vim patch 7.3.629, 'shiftwidth' can be set to 0 to follow 'tabstop').
10299
if exists('*shiftwidth')
@@ -121,7 +118,9 @@ function! s:find_opening_paren(...)
121118
endif
122119

123120
" Return if cursor is in a comment.
124-
exe 'if' s:skip_search '| return [0, 0] | endif'
121+
if synIDattr(synID(line('.'), col('.'), 0), 'name') =~? 'comment'
122+
return [0, 0]
123+
endif
125124

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

0 commit comments

Comments
 (0)