Bug 308957

Summary: line continuation + comment = broken C++ preprocessor highlighting
Product: [Applications] kate Reporter: Matthew Woehlke <mwoehlke.floss>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cullmann
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Matthew Woehlke 2012-10-24 20:10:10 UTC
The following is not highlighted correctly:

// kate: hl c++
#if predicate1 /* this line will be really long */ && \
    predicate2 /* with multiple line continuations */ && \
    predicate3 /* see? told you so... */

Reproducible: Always

Steps to Reproduce:
1. Save above text to a file and open in kwrite/kate/etc.
Actual Results:  
'predicate3' is highlighted as normal text

Expected Results:  
'predicate3' is highlighted as preprocessor

It appears that comments in preprocessor context after a line continuation are causing katepart to fall out of the preprocessor context.

cpp.xml version 1.49
Comment 1 Christoph Cullmann 2012-10-24 21:44:52 UTC
Fixed by fixing the similar bug 300009
Works in master now.

*** This bug has been marked as a duplicate of bug 300009 ***
Comment 2 Matthew Woehlke 2012-10-24 23:43:04 UTC
Thanks! (Heh, I suspected it was an internal katepart bug, after looking at cpp.xml and thinking it was correct ... :-) )