From 0586a518f9cc8a590a35fd2443be4c0677bc45ad Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 16 Nov 2018 10:32:45 +0100 Subject: [PATCH 1/1] Do not skip/check concealed --- indent/python.vim | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/indent/python.vim b/indent/python.vim index 96f12c2..e3c2352 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -80,13 +80,17 @@ let s:skip_after_opening_paren = 'synIDattr(synID(line("."), col("."), 0), "name \ '=~? "\\vcomment|jedi\\S"' " Also ignore anything concealed. -" Wrapper around synconcealed for older Vim (7.3.429, used on Travis CI). -function! s:is_concealed(line, col) - let concealed = synconcealed(a:line, a:col) - return len(concealed) && concealed[0] -endfunction -if has('conceal') - let s:skip_special_chars .= '|| s:is_concealed(line("."), col("."))' +" TODO: doc; likely only necessary with jedi-vim, where a better version is +" planned (https://github.com/Vimjas/vim-python-pep8-indent/pull/98). +if get(g:, 'python_pep8_indent_skip_concealed', 0) + " Wrapper around synconcealed for older Vim (7.3.429, used on Travis CI). + function! s:is_concealed(line, col) + let concealed = synconcealed(a:line, a:col) + return len(concealed) && concealed[0] + endfunction + if has('conceal') + let s:skip_special_chars .= '|| s:is_concealed(line("."), col("."))' + endif endif -- 2.39.5