Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394353 - app-vim/gtk-syntax-20110214-r1 mishighlights the "if" keyword as a function.
Summary: app-vim/gtk-syntax-20110214-r1 mishighlights the "if" keyword as a function.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Vim Maintainers
Depends on:
Reported: 2011-12-11 16:31 UTC by Petter Urkedal
Modified: 2013-07-17 00:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Patch for gtk-syntax-20110214/syntax/clutter.vim and .../gobject.vim. (removed_if.diff,116.14 KB, patch)
2012-01-11 16:05 UTC, Andrew Petelin
Details | Diff
ebuild for latest version (gtk-syntax-20110314.ebuild,492 bytes, text/plain)
2012-07-14 07:02 UTC, Michael Yagliyan

Note You need to log in before you can comment on or make changes to this bug.
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:
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.