mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 18:59:11 +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;
|
function TProject.UnitWithEditorIndex(Index:integer):TUnitInfo;
|
||||||
begin
|
begin
|
||||||
|
if Index<0 then exit(nil);
|
||||||
Result:=fFirst[uilWithEditorIndex];
|
Result:=fFirst[uilWithEditorIndex];
|
||||||
while (Result<>nil) and (Result.EditorIndex<>Index) do begin
|
while (Result<>nil) and (Result.EditorIndex<>Index) do begin
|
||||||
Result:=Result.fNext[uilWithEditorIndex];
|
Result:=Result.fNext[uilWithEditorIndex];
|
||||||
|
@ -672,7 +672,7 @@ type
|
|||||||
procedure ShowFPDocEditor;
|
procedure ShowFPDocEditor;
|
||||||
procedure UpdateFPDocEditor;
|
procedure UpdateFPDocEditor;
|
||||||
|
|
||||||
property Editors[Index:integer]:TSourceEditor read GetEditors;
|
property Editors[Index:integer]:TSourceEditor read GetEditors; // !!! not ordered for PageIndex
|
||||||
function EditorCount:integer;
|
function EditorCount:integer;
|
||||||
function Count: integer; override;
|
function Count: integer; override;
|
||||||
function Empty: boolean;
|
function Empty: boolean;
|
||||||
@ -5394,7 +5394,7 @@ var
|
|||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
TheFileList:= TStringList.Create;
|
TheFileList:= TStringList.Create;
|
||||||
for i:= 0 to self.EditorCount -1 do
|
for i:= 0 to EditorCount -1 do
|
||||||
begin
|
begin
|
||||||
//only if file exists on disk
|
//only if file exists on disk
|
||||||
if FilenameIsAbsolute(Editors[i].FileName) and
|
if FilenameIsAbsolute(Editors[i].FileName) and
|
||||||
@ -6622,7 +6622,7 @@ var
|
|||||||
begin
|
begin
|
||||||
for i := 0 to EditorCount-1 do begin
|
for i := 0 to EditorCount-1 do begin
|
||||||
ASrcEdit:=Editors[i];
|
ASrcEdit:=Editors[i];
|
||||||
AnUnitInfo:=Project1.UnitWithEditorIndex(i);
|
AnUnitInfo:=Project1.UnitWithEditorIndex(ASrcEdit.PageIndex);
|
||||||
if AnUnitInfo<>nil then
|
if AnUnitInfo<>nil then
|
||||||
ASrcEdit.SyntaxHighlighterType:=AnUnitInfo.SyntaxHighlighter;
|
ASrcEdit.SyntaxHighlighterType:=AnUnitInfo.SyntaxHighlighter;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user