Преглед изворни кода

Compiler IDE change: Improve highlighting for the [CustomMessages] and [Messages] sections

Martijn Laan пре 5 година
родитељ
комит
19d873a009
2 измењених фајлова са 13 додато и 2 уклоњено
  1. 8 2
      Components/ScintStylerInnoSetup.pas
  2. 5 0
      whatsnew.htm

+ 8 - 2
Components/ScintStylerInnoSetup.pas

@@ -7,6 +7,8 @@ unit ScintStylerInnoSetup;
   For conditions of distribution and use, see LICENSE.TXT.
 
   TInnoSetupStyler: styler for Inno Setup scripts
+  
+  Requires MsgIDs.pas from the Inno Setup source code
 }
 
 interface
@@ -101,7 +103,7 @@ type
 implementation
 
 uses
-  TypInfo;
+  TypInfo, MsgIDs;
 
 type
   TInnoSetupStylerLineState = record
@@ -1205,8 +1207,12 @@ begin
   end;
 
   case Section of
+    scCustomMessages:
+      I := 0;
     scLangOptions:
       I := GetEnumValue(TypeInfo(TLangOptionsSectionDirective), 'ls' + S);
+    scMessages:
+      I := GetEnumValue(TypeInfo(TSetupMessageID), 'msg' + S);
     scSetup:
       I := GetEnumValue(TypeInfo(TSetupSectionDirective), 'ss' + S);
   else
@@ -1215,7 +1221,7 @@ begin
   if I <> -1 then
     CommitStyle(stKeyword)
   else begin
-    if Section in [scLangOptions, scSetup] then
+    if Section in [scLangOptions, scMessages, scSetup] then
       CommitStyleSqPending(stDefault)
     else
       CommitStyle(stDefault);

+ 5 - 0
whatsnew.htm

@@ -28,6 +28,11 @@ For conditions of distribution and use, see <a href="https://jrsoftware.org/file
 
 <p><b>Want to be notified by e-mail of updates?</b> Then <a href="https://jrsoftware.org/ismail.php">click here to subscribe</a> to the Inno Setup announcements mailing list.<br /><b>If you subscribed before October 2019, please resubscribe.</b></p>
 
+<p><a name="6.0.6"></a><span class="ver">6.0.6-dev </span><span class="date">(?)</span></p>
+<ul>
+  <li>Compiler IDE change: <a href="https://i.imgur.com/wHoJ3FG.png">Improved highlighting</a> for the [CustomMessages] and [Messages] sections.</li>
+</ul>
+
 <p><a name="6.0.5"></a><span class="ver">6.0.5 </span><span class="date">(2020-05-21)</span></p>
 <ul>
   <li>Changes to further help protect installers against potential DLL preloading attacks.</li>