Bug 146524 - parenthesis matching/highlighting broken in Makefile mode
Summary: parenthesis matching/highlighting broken in Makefile mode
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-08 08:00 UTC by stephan beal
Modified: 2008-05-07 20:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Makefile syntax highlighting source (5.29 KB, text/plain)
2008-05-07 19:48 UTC, Rui Santana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stephan beal 2007-06-08 08:00:56 UTC
Version:           2.5.7 (using KDE 3.5.7, Kubuntu (feisty) 4:3.5.7-0ubuntu1~feisty2)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.20-16-generic

Steps to reproduct:

1) Open a new file.
2) Click Tools --> Highlighting --> Other --> Makefile
3) Enter the following text:

$(eval $(shell ls)

As soon as the ) character is entered, kate highlight-matches the LEFT-most ( character from $(eval, instead of the one from $(shell.
Comment 1 Mirko Stocker 2007-12-31 16:02:20 UTC
The problem seems to be that we are only matching brackets if they have the same attributes set (katedocument.cpp:5078), and that's not the case in your example. I also noticed that the highlighting isn't correct (the last bracket should be blue, not red, right?), and that this bug can be fixed by correcting the highlighting rules. Unfortunately, I have no clue on how to do that..
Comment 2 Rui Santana 2008-05-07 19:45:27 UTC
It's needed a new context to handle the syntax inside the brackets. I have set the functions names to keyword and made a new context.

I think this will solve this problem.
Comment 3 Rui Santana 2008-05-07 19:48:18 UTC
Created attachment 24660 [details]
Makefile syntax highlighting source

This should fix the brackets broken syntax.
Comment 4 Mirko Stocker 2008-05-07 20:26:29 UTC
SVN commit 805150 by mstocker:

New syntax file for Makefiles from Rui Santana. Thanks a lot!

BUG: 146524


 M  +51 -7     makefile.xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=805150