Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 312079

Summary: app-editors/vim-7.2.303: syntax highlighting bug - Bash conditional expression [[ ]], escaped double quote and regex match operator =~
Product: Gentoo Linux Reporter: tbartdev
Component: Current packagesAssignee: Vim Maintainers <vim>
Status: RESOLVED FIXED    
Severity: minor CC: didier-bugzillagentoo
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description tbartdev 2010-03-30 13:58:52 UTC
There is a syntax highlighting bug in vim when using only one escaped double quote within double square brackets and the regex match operator

Reproducible: Always

Steps to Reproduce:
1. open (g)vim
2. put this into a document:
#!/bin/bash
[[ $a =~ \" ]] && echo something
3. Possibly save (and reopen) to activate bash syntax highlighting

Actual Results:  
Everything after the escaped double quote is treated as if after an UNescaped double quote

Expected Results:  
Escaped quote should be handled as such and not be treated as a regular double quote

Error seems to be in /usr/share/vim/vim72/syntax/sh.vim
but I neither have a clue of vim syntax highlighting language nor whether this is a Gentoo bug or a vim bug...
Comment 1 Didier Barvaux 2010-03-30 21:00:32 UTC
Confirmed on Gentoo x86 with app-editors/vim-7.2.303 and app-editors/vim-core-7.2.303. It also happens on a Debian system with version 7.1.314 of vim.
Comment 2 Jim Ramsay (lack) (RETIRED) gentoo-dev 2011-09-25 00:32:50 UTC
I just tested this with the latest vim (7.3.322) and this has been fixed sometime in the intervening years.
Comment 3 Didier Barvaux 2011-09-25 10:41:09 UTC
> I just tested this with the latest vim (7.3.322) and this has been fixed
> sometime in the intervening years.

Confirmed with vim 7.3.322 emerged with the ~x86 keyword for the test.