mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 06:16:05 +02:00
IDE: fixed TSourceNotebook.ReloadHighlighters using wrong PageIndex
git-svn-id: trunk@22172 -
This commit is contained in:
parent
39fd8546c7
commit
5c3bf6fbea
@ -3102,6 +3102,7 @@ end;
|
||||
|
||||
function TProject.UnitWithEditorIndex(Index:integer):TUnitInfo;
|
||||
begin
|
||||
if Index<0 then exit(nil);
|
||||
Result:=fFirst[uilWithEditorIndex];
|
||||
while (Result<>nil) and (Result.EditorIndex<>Index) do begin
|
||||
Result:=Result.fNext[uilWithEditorIndex];
|
||||
|
@ -672,7 +672,7 @@ type
|
||||
procedure ShowFPDocEditor;
|
||||
procedure UpdateFPDocEditor;
|
||||
|
||||
property Editors[Index:integer]:TSourceEditor read GetEditors;
|
||||
property Editors[Index:integer]:TSourceEditor read GetEditors; // !!! not ordered for PageIndex
|
||||
function EditorCount:integer;
|
||||
function Count: integer; override;
|
||||
function Empty: boolean;
|
||||
@ -5394,7 +5394,7 @@ var
|
||||
begin
|
||||
try
|
||||
TheFileList:= TStringList.Create;
|
||||
for i:= 0 to self.EditorCount -1 do
|
||||
for i:= 0 to EditorCount -1 do
|
||||
begin
|
||||
//only if file exists on disk
|
||||
if FilenameIsAbsolute(Editors[i].FileName) and
|
||||
@ -6622,7 +6622,7 @@ var
|
||||
begin
|
||||
for i := 0 to EditorCount-1 do begin
|
||||
ASrcEdit:=Editors[i];
|
||||
AnUnitInfo:=Project1.UnitWithEditorIndex(i);
|
||||
AnUnitInfo:=Project1.UnitWithEditorIndex(ASrcEdit.PageIndex);
|
||||
if AnUnitInfo<>nil then
|
||||
ASrcEdit.SyntaxHighlighterType:=AnUnitInfo.SyntaxHighlighter;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user