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

Bug 394353

Summary: app-vim/gtk-syntax-20110214-r1 mishighlights the "if" keyword as a function.
Product: Gentoo Linux Reporter: Petter Urkedal <urkedal>
Component: Current packagesAssignee: Vim Maintainers <vim>
Status: RESOLVED FIXED    
Severity: normal CC: adrianopol, burnsmellfactory
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for gtk-syntax-20110214/syntax/clutter.vim and .../gobject.vim.
ebuild for latest version

Description Petter Urkedal 2011-12-11 16:31:16 UTC
To of the C syntax extensions in gtk-syntax highlights the "if" keyword a a function.

In /usr/share/vim/vimfiles/syntax/clutter.vim:
syn keyword clutterFunction [...] if

In /usr/share/vim/vimfiles/syntax/gobject.vim:
syn keyword gobjectFunction [...] if

Reproducible: Always

Steps to Reproduce:
1. Turn on syntax hightighting in Vim and use a colourscheme which distinguishes functions from conditionals, (e.g. ":colorscheme bclear").
2. Open a C sources file.
3. Look of an "if" keyword.
Actual Results:  
"if" is highlighted as a function.

Expected Results:  
"if" is highlighted as a conditional.

As a workaround the respective runtime-directives in /usr/share/vim/vimfiles/after/syntax/c.vim can be commented out.
Comment 1 Petter Urkedal 2011-12-11 16:34:15 UTC
I forgot: The package version is app-vim/gtk-syntax-20110214-r1.
Comment 2 Andrew Petelin 2012-01-11 16:05:57 UTC
Created attachment 298655 [details, diff]
Patch for gtk-syntax-20110214/syntax/clutter.vim and .../gobject.vim.

Removed `if` keyword from clutter.vim and gobject.vim. Other files do not contain it. Syntax highlighting is OK after this.
Comment 3 Michael Yagliyan 2012-07-14 06:44:08 UTC
I can confirm this.  Indeed those 2 vim files contain an "if" at the end.  This is actually already fixed upstream in version 20110314:
http://www.vim.org/scripts/script.php?script_id=1000
Comment 4 Michael Yagliyan 2012-07-14 07:02:40 UTC
Created attachment 318118 [details]
ebuild for latest version

I just copied gtk-syntax-20110214-r1.ebuild and gave it an appropriate name (and removed the $Header line since I don't have that information yet).  It inherits "vim-plugin", which I assume contains all the logic to fetch the correct file.
Comment 5 Tim Harder gentoo-dev 2013-07-17 00:09:46 UTC
This should be fixed in >=20121015.