Bug 249316

Summary: highlighting engine ignores fallthrough="true"
Product: kate Reporter: Lukas Sommer <sommerluk>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.2   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: bug.xml
syntaxbug
snapshot.png

Description Lukas Sommer 2010-08-28 13:05:41 UTC
Version:           0.2 (using KDE 4.3.5) 
OS:                Linux

The highlighting engine of Kate ignores the attribute fallthrough="true" in a Context tag if this Context tag is the first one in the highlighting XML file.

Reproducible: Didn't try

Steps to Reproduce:
Install the attached bug.xml.

Open the attached file "syntaxbug"

Actual Results:  
In line 2 and 3, the letters 'd' are displayed as dsNormal and abc as 'dsDataType'.

Expected Results:  
In line 2, the whole line falls through the context "default" because no rule matches. It should therefore be displayed entirely as dsError (red). In line 3, starting with the first 'd', everything (also 'abc') should be displayed as dsError.

OS: Linux (i686) release 2.6.31.12-0.2-default
Compiler: gcc
Comment 1 Lukas Sommer 2010-08-28 13:06:47 UTC
Created attachment 51047 [details]
bug.xml
Comment 2 Lukas Sommer 2010-08-28 13:07:33 UTC
Created attachment 51048 [details]
syntaxbug
Comment 3 Lukas Sommer 2010-08-28 13:07:52 UTC
Created attachment 51049 [details]
snapshot.png
Comment 4 Christoph Cullmann 2012-11-07 23:00:28 UTC
Git commit decfe63b0911a58263fc7e20c448468ea3efe0d9 by Christoph Cullmann.
Committed on 07/11/2012 at 23:59.
Pushed by cullmann into branch 'master'.

allow fall-through for initial context if user really wants it ;)

M  +9    -12   part/syntax/katehighlight.cpp

http://commits.kde.org/kate/decfe63b0911a58263fc7e20c448468ea3efe0d9