python-syntax icon indicating copy to clipboard operation
python-syntax copied to clipboard

Indentation broken after b'{'

Open ghost opened this issue 5 years ago • 2 comments
trafficstars

I ran a git bisect and it seems like since commit 8d58bf4 back in 2016 this plugin breaks indentation after a byte string with an unclosed {, such as b'{', resulting in the following indentation:

if license.startswith(b'{'):
        print('json license')
        else:
        print('regular license')

I have no idea how a syntax highlighting plugin breaks this, but it does.

Reproduced on Debian 10 x64 and NVIM v0.5.0-799-g186ba3b68 with minimal init.vim:

call plug#begin('~/.config/nvim/plugged')
Plug 'vim-python/python-syntax'
call plug#end()

ghost avatar Nov 03 '20 16:11 ghost

I have currently no clue why this occurs, but the issue disappears when you remove all the contains= from pythonBytes at L171-L174. Seems to also still work if you only keep contains=@Spell.

nfnty avatar Dec 02 '20 19:12 nfnty