octol / vim-cpp-enhanced-highlight

Additional Vim syntax highlighting for C++ (including C++11/14/17)
MIT License
1.07k stars 150 forks source link

No highlighting for function names beginning with an upper case #31

Closed zachwhaley closed 8 years ago

zachwhaley commented 8 years ago

screenshot from 2016-08-29 11-59-59

Running f4351bac4fb7565cbccc9aff6b97005183abdee3

Seen on NeoVim 0.1.5 and Vim 7.4

zachwhaley commented 8 years ago

After running a git bisect, I found this was the offending commit e738b20032441c6f8a0b17d7c0071877154bc61a

octol commented 8 years ago

Thanks for tracking down the regression. This behaviour certainly needs to be fixed.

zachwhaley commented 8 years ago

No problem :)

Disabling this line is what is causing the issue, btw

asterix commented 8 years ago

I'm currently using the below lines to fix upper case function highlight issue and disabling Octol's lines. This is a standard C function parser.

syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
syn match cUserFunctionPointer "(\s*\*\s*\h\w*\s*)\(\s\|\n\)*(" contains=cDelimiter,cOperator

hi def link cUserFunction cFunction
hi def link cUserFunctionPointer cFunction
octol commented 8 years ago

Ok so I've started looking into this, but locally on my machine running Vim 8.0 the above example works fine for me...

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 05 2016 03:34:23)
Included patches: 1-22
octol commented 8 years ago

Ok sorry now I see it, it's only when g:cpp_class_scope_highlight = 1.