Ticket #2323 (accepted defect)

Opened 10 years ago

Last modified 7 years ago

syntax hightlighting rule order bogus

Reported by: ossi Owned by: zaytsev
Priority: major Milestone: Future Releases
Component: mcedit Version: master
Keywords: Cc: zaytsev
Blocked By: #2308 Blocking:
Branch state: no branch Votes for changeset:


opening the file makefile.cpp in the editor causes it to be highlighted with Makefile syntax instead of C++ syntax.

the fix is checking the extension rules first.

Change History

comment:1 Changed 10 years ago by ossi

also, the regexp is waaaaay too broad. it should be something like that:

file ([Mm]akefile(\\...\*)?|..\*\\.mk|Kbuild)$ Makefile
Last edited 7 years ago by ossi (previous) (diff)

comment:2 Changed 10 years ago by zaytsev

  • Status changed from new to accepted
  • Cc zaytsev added
  • Owner set to zaytsev

comment:3 Changed 10 years ago by andrew_b

  • Blocked By 2308 added

comment:4 Changed 9 years ago by andrew_b

  • Branch state set to no branch
  • Milestone set to Future Releases

comment:5 Changed 7 years ago by ossi

the patch i'm using:

diff --git a/misc/syntax/Syntax.in b/misc/syntax/Syntax.in
index e8025ee..ca55879 100644
--- a/misc/syntax/Syntax.in
+++ b/misc/syntax/Syntax.in
@@ -64,9 +64,6 @@ include xml.syntax
 file ..\*\\.(tt|TT)$ Template::Toolkit\sFile
 include tt.syntax
-file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|..\*\\.mak|Kbuild)$ Makefile
-include makefile.syntax
 file CMakeLists.txt$ CMake
 include cmake.syntax
@@ -256,5 +253,8 @@ include jal.syntax
 file ..\*\\.([lL][kK][rR])$ PIC\slinker\sscript\sfile
 include lkr.syntax
+file ([Mm]akefile(\\...\*)?|..\*\\.mk|..\*\\.mak|Kbuild)$ Makefile
+include makefile.syntax
 file .\* unknown
 include unknown.syntax
Note: See TracTickets for help on using tickets.