Browse Source

Fix bug report 28822, source file test.test.pas gets pascal syntax highlighting

git-svn-id: trunk@34210 -
pierre 9 years ago
parent
commit
71782a85f3
2 changed files with 4 additions and 3 deletions
  1. 2 1
      ide/fpdesk.pas
  2. 2 2
      ide/fpide.pas

+ 2 - 1
ide/fpdesk.pas

@@ -356,7 +356,8 @@ end;
 function DeskUseSyntaxHighlight(Editor: PFileEditor): boolean;
 var b : boolean;
 begin
-  b:= (*(Editor^.IsFlagSet(efSyntaxHighlight)) and *) ((Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),HighlightExts));
+  b:= (*(Editor^.IsFlagSet(efSyntaxHighlight)) and *) ((Editor^.FileName='') or
+      MatchesMaskList(NameAndExtOf(Editor^.FileName),HighlightExts));
   DeskUseSyntaxHighlight:=b;
 end;
 

+ 2 - 2
ide/fpide.pas

@@ -794,14 +794,14 @@ end;
 
 function IDEUseSyntaxHighlight(Editor: PFileEditor): boolean;
 begin
-  IDEUseSyntaxHighlight:=(Editor^.IsFlagSet(efSyntaxHighlight)) and ((Editor^.FileName='') or MatchesFileList(NameAndExtOf(Editor^.FileName),HighlightExts));
+  IDEUseSyntaxHighlight:=(Editor^.IsFlagSet(efSyntaxHighlight)) and ((Editor^.FileName='') or MatchesMaskList(NameAndExtOf(Editor^.FileName),HighlightExts));
 end;
 
 function IDEUseTabsPattern(Editor: PFileEditor): boolean;
 begin
   { the commented code lead all new files
     to become with TAB use enabled which is wrong in my opinion PM }
-  IDEUseTabsPattern:={(Editor^.FileName='') or }MatchesFileList(NameAndExtOf(Editor^.FileName),TabsPattern);
+  IDEUseTabsPattern:={(Editor^.FileName='') or }MatchesMaskList(NameAndExtOf(Editor^.FileName),TabsPattern);
 end;
 
 constructor TIDEApp.Init;