willys5000 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

sh.vim syntax highlighting glitch in shell patterns including a # inside bracket expression #318

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using this line in a shell script (sh/ksh/bash) breaks highlighting 
beginning with the '#' inside the bracket expression.
2. [[ $_l == [!#=]*=?* ]] || continue

What is the expected output? What do you see instead?
I'd expect the '#' to have the same color as the rest of [!#=] part.
Instead the '#' is grey like the rest of the line and the syntax highlighting 
as well as the folding is broken starting from this line until the end of the 
file. E.g folding the function with that line collapes the rest of the script.

What version of the product are you using? On what operating system?
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 19 2014 13:33:19)
OpenBSD 5.7-beta (GENERIC.MP) #0: Fri Jan 16 18:40:00 CET 2015

Please provide any additional information below.
Unfortunately, I don't know enough about vim syntax script to provide a patch.

Original issue reported on code.google.com by robert.p...@gmail.com on 16 Jan 2015 at 8:37

GoogleCodeExporter commented 9 years ago
Fixed in sh.vim v133, available from 
http://wwww.drchip.org/astronaut/vim/index.html#SYNTAX_SH

Original comment by drc...@campbellfamily.biz on 25 Mar 2015 at 4:11