Martijn Laan 1 year ago
parent
commit
1393f441eb
2 changed files with 16 additions and 16 deletions
  1. 12 12
      Projects/CompForm.pas
  2. 4 4
      Projects/CompFunc.pas

+ 12 - 12
Projects/CompForm.pas

@@ -429,7 +429,7 @@ type
     function InitializeNonFileMemo(const Memo: TCompScintEdit; const PopupMenu: TPopupMenu): TCompScintEdit;
     function InitializeNonFileMemo(const Memo: TCompScintEdit; const PopupMenu: TPopupMenu): TCompScintEdit;
     procedure InitiateAutoComplete(const Key: AnsiChar);
     procedure InitiateAutoComplete(const Key: AnsiChar);
     procedure InvalidateStatusPanel(const Index: Integer);
     procedure InvalidateStatusPanel(const Index: Integer);
-    procedure LoadKnownIncludedFilesAndUpdateMemos(const AFilename: String);
+    procedure LoadKnownIncludedAndHiddenFilesAndUpdateMemos(const AFilename: String);
     procedure MemoChange(Sender: TObject; const Info: TScintEditChangeInfo);
     procedure MemoChange(Sender: TObject; const Info: TScintEditChangeInfo);
     procedure MemoCharAdded(Sender: TObject; Ch: AnsiChar);
     procedure MemoCharAdded(Sender: TObject; Ch: AnsiChar);
     procedure MainMemoDropFiles(Sender: TObject; X, Y: Integer; AFiles: TStrings);
     procedure MainMemoDropFiles(Sender: TObject; X, Y: Integer; AFiles: TStrings);
@@ -457,7 +457,7 @@ type
     procedure ResetAllMemosLineState;
     procedure ResetAllMemosLineState;
     procedure StartProcess;
     procedure StartProcess;
     function SaveFile(const AMemo: TCompScintFileEdit; const SaveAs: Boolean): Boolean;
     function SaveFile(const AMemo: TCompScintFileEdit; const SaveAs: Boolean): Boolean;
-    procedure SaveKnownIncludedFiles(const AFilename: String);
+    procedure SaveKnownIncludedAndHiddenFiles(const AFilename: String);
     procedure SetErrorLine(const AMemo: TCompScintFileEdit; const ALine: Integer);
     procedure SetErrorLine(const AMemo: TCompScintFileEdit; const ALine: Integer);
     procedure SetStatusPanelVisible(const AVisible: Boolean);
     procedure SetStatusPanelVisible(const AVisible: Boolean);
     procedure SetStepLine(const AMemo: TCompScintFileEdit; ALine: Integer);
     procedure SetStepLine(const AMemo: TCompScintFileEdit; ALine: Integer);
@@ -1041,7 +1041,7 @@ begin
   FMainMemo.ClearUndo;
   FMainMemo.ClearUndo;
 end;
 end;
 
 
-procedure TCompileForm.LoadKnownIncludedFilesAndUpdateMemos(const AFilename: String);
+procedure TCompileForm.LoadKnownIncludedAndHiddenFilesAndUpdateMemos(const AFilename: String);
 var
 var
   Strings: TStringList;
   Strings: TStringList;
   IncludedFile: TIncludedFile;
   IncludedFile: TIncludedFile;
@@ -1054,7 +1054,7 @@ begin
     if AFilename <> '' then begin
     if AFilename <> '' then begin
       Strings := TStringList.Create;
       Strings := TStringList.Create;
       try
       try
-        LoadKnownIncludedFiles(AFilename, Strings, FHiddenFiles);
+        LoadKnownIncludedAndHiddenFiles(AFilename, Strings, FHiddenFiles);
         if Strings.Count > 0 then begin
         if Strings.Count > 0 then begin
           try
           try
             for I := 0 to Strings.Count-1 do begin
             for I := 0 to Strings.Count-1 do begin
@@ -1078,7 +1078,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TCompileForm.SaveKnownIncludedFiles(const AFilename: String);
+procedure TCompileForm.SaveKnownIncludedAndHiddenFiles(const AFilename: String);
 var
 var
   Strings: TStringList;
   Strings: TStringList;
   IncludedFile: TIncludedFile;
   IncludedFile: TIncludedFile;
@@ -1089,7 +1089,7 @@ begin
       try
       try
         for IncludedFile in FIncludedFiles do
         for IncludedFile in FIncludedFiles do
           Strings.Add(IncludedFile.Filename);
           Strings.Add(IncludedFile.Filename);
-        CompFunc.SaveKnownIncludedFiles(AFilename, Strings, FHiddenFiles);
+        CompFunc.SaveKnownIncludedAndHiddenFiles(AFilename, Strings, FHiddenFiles);
       finally
       finally
         Strings.Free;
         Strings.Free;
       end;
       end;
@@ -1197,7 +1197,7 @@ begin
     ModifyMRUMainFilesList(AFilename, True);
     ModifyMRUMainFilesList(AFilename, True);
     if MainMemoAddToRecentDocs then
     if MainMemoAddToRecentDocs then
       AddFileToRecentDocs(AFilename);
       AddFileToRecentDocs(AFilename);
-    LoadKnownIncludedFilesAndUpdateMemos(AFilename);
+    LoadKnownIncludedAndHiddenFilesAndUpdateMemos(AFilename);
   end;
   end;
 end;
 end;
 
 
@@ -1281,7 +1281,7 @@ begin
   Result := True;
   Result := True;
   if AMemo = FMainMemo then begin
   if AMemo = FMainMemo then begin
     ModifyMRUMainFilesList(AMemo.Filename, True);
     ModifyMRUMainFilesList(AMemo.Filename, True);
-    SaveKnownIncludedFiles(AMemo.Filename);
+    SaveKnownIncludedAndHiddenFiles(AMemo.Filename);
   end;
   end;
 end;
 end;
 
 
@@ -1493,7 +1493,7 @@ begin
         begin
         begin
           Form.FPreprocessorOutput := TrimRight(Data.PreprocessedScript);
           Form.FPreprocessorOutput := TrimRight(Data.PreprocessedScript);
           DecodeIncludedFilenames(Data.IncludedFilenames, Form.FIncludedFiles); { Also stores last write time }
           DecodeIncludedFilenames(Data.IncludedFilenames, Form.FIncludedFiles); { Also stores last write time }
-          Form.SaveKnownIncludedFiles(Filename);
+          Form.SaveKnownIncludedAndHiddenFiles(Filename);
         end;
         end;
       iscbNotifySuccess:
       iscbNotifySuccess:
         begin
         begin
@@ -2299,7 +2299,7 @@ begin
   MemosTabSet.Hints.Delete(Index);
   MemosTabSet.Hints.Delete(Index);
   FActiveMemo.Visible := False;
   FActiveMemo.Visible := False;
   FHiddenFiles.Add((FActiveMemo as TCompScintFileEdit).Filename);
   FHiddenFiles.Add((FActiveMemo as TCompScintFileEdit).Filename);
-  SaveKnownIncludedFiles(FMainMemo.Filename);
+  SaveKnownIncludedAndHiddenFiles(FMainMemo.Filename);
 
 
   { Select next tab, except when we're already at the end }
   { Select next tab, except when we're already at the end }
   VNextTabClick(Self);
   VNextTabClick(Self);
@@ -2313,7 +2313,7 @@ begin
   var ReopenFilename := FHiddenFiles[MenuItem.Tag];
   var ReopenFilename := FHiddenFiles[MenuItem.Tag];
   FHiddenFiles.Delete(MenuItem.Tag);
   FHiddenFiles.Delete(MenuItem.Tag);
   UpdatePreprocMemos;
   UpdatePreprocMemos;
-  SaveKnownIncludedFiles(FMainMemo.Filename);
+  SaveKnownIncludedAndHiddenFiles(FMainMemo.Filename);
 
 
   { Activate the memo }
   { Activate the memo }
   for var Memo in FFileMemos do begin
   for var Memo in FFileMemos do begin
@@ -3185,7 +3185,7 @@ begin
   if HiddenFileIndex <> -1 then begin
   if HiddenFileIndex <> -1 then begin
     FHiddenFiles.Delete(HiddenFileIndex);
     FHiddenFiles.Delete(HiddenFileIndex);
     UpdatePreprocMemos;
     UpdatePreprocMemos;
-    SaveKnownIncludedFiles(FMainMemo.Filename);
+    SaveKnownIncludedAndHiddenFiles(FMainMemo.Filename);
   end;
   end;
 
 
   { Move caret }
   { Move caret }

+ 4 - 4
Projects/CompFunc.pas

@@ -41,8 +41,8 @@ procedure OpenMailingListSite;
 procedure ReadMRUList(const MRUList: TStringList; const Section, Ident: String);
 procedure ReadMRUList(const MRUList: TStringList; const Section, Ident: String);
 procedure ModifyMRUList(const MRUList: TStringList; const Section, Ident: String;
 procedure ModifyMRUList(const MRUList: TStringList; const Section, Ident: String;
   const AItem: String; const AddNewItem: Boolean; CompareProc: TMRUItemCompareProc);
   const AItem: String; const AddNewItem: Boolean; CompareProc: TMRUItemCompareProc);
-procedure LoadKnownIncludedFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
-procedure SaveKnownIncludedFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
+procedure LoadKnownIncludedAndHiddenFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
+procedure SaveKnownIncludedAndHiddenFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
 procedure DeleteKnownIncludedFiles(const AFilename: String);
 procedure DeleteKnownIncludedFiles(const AFilename: String);
 procedure SetFakeShortCutText(const MenuItem: TMenuItem; const S: String);
 procedure SetFakeShortCutText(const MenuItem: TMenuItem; const S: String);
 procedure SetFakeShortCut(const MenuItem: TMenuItem; const Key: Word;
 procedure SetFakeShortCut(const MenuItem: TMenuItem; const Key: Word;
@@ -239,7 +239,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure LoadKnownIncludedFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
+procedure LoadKnownIncludedAndHiddenFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
 begin
 begin
   var OldIncludedFilesDelimiter := IncludedFiles.Delimiter;
   var OldIncludedFilesDelimiter := IncludedFiles.Delimiter;
   var OldHiddenFilesDelimiter := HiddenFiles.Delimiter;
   var OldHiddenFilesDelimiter := HiddenFiles.Delimiter;
@@ -258,7 +258,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure SaveKnownIncludedFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
+procedure SaveKnownIncludedAndHiddenFiles(const AFilename: String; const IncludedFiles, HiddenFiles: TStringList);
 begin
 begin
   if IncludedFiles.Count = 0 then begin
   if IncludedFiles.Count = 0 then begin
     DeleteKnownIncludedFiles(AFilename);
     DeleteKnownIncludedFiles(AFilename);