mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 23:59:07 +02:00
SourceEditor: small fixes to not yet used code (multi window)
git-svn-id: trunk@24123 -
This commit is contained in:
parent
a1b9664066
commit
9e0ad791fc
@ -7112,7 +7112,7 @@ begin
|
|||||||
else
|
else
|
||||||
Window := SourceWindowWithEditor(AValue);
|
Window := SourceWindowWithEditor(AValue);
|
||||||
if Window = nil then exit;
|
if Window = nil then exit;
|
||||||
FActiveWindow := TSourceNotebook(Window);
|
ActiveSourceWindow := TSourceNotebook(Window);
|
||||||
Window.ActiveEditor := AValue;
|
Window.ActiveEditor := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7122,8 +7122,10 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
i := 0;
|
i := 0;
|
||||||
while (i < SourceWindowCount) and (Index >= SourceWindows[i].Count) do
|
while (i < SourceWindowCount) and (Index >= SourceWindows[i].Count) do begin
|
||||||
Index := Index - SourceWindows[i].Count;
|
Index := Index - SourceWindows[i].Count;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
if (i < SourceWindowCount) then
|
if (i < SourceWindowCount) then
|
||||||
Result := SourceWindows[i].Items[Index]
|
Result := SourceWindows[i].Items[Index]
|
||||||
else
|
else
|
||||||
@ -7153,9 +7155,11 @@ function TSourceEditorManagerBase.IndexOfSourceWindow(
|
|||||||
AWindow: TSourceEditorWindowInterface): integer;
|
AWindow: TSourceEditorWindowInterface): integer;
|
||||||
begin
|
begin
|
||||||
Result := SourceWindowCount - 1;
|
Result := SourceWindowCount - 1;
|
||||||
while Result >= 0 do
|
while Result >= 0 do Begin
|
||||||
if SourceWindows[Result] = AWindow then
|
if SourceWindows[Result] = AWindow then
|
||||||
exit;
|
exit;
|
||||||
|
dec(Result);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceEditorManagerBase.SourceEditorIntfWithFilename(
|
function TSourceEditorManagerBase.SourceEditorIntfWithFilename(
|
||||||
@ -7415,8 +7419,9 @@ end;
|
|||||||
function TSourceEditorManager.ActiveOrNewSourceWindow: TSourceNotebook;
|
function TSourceEditorManager.ActiveOrNewSourceWindow: TSourceNotebook;
|
||||||
begin
|
begin
|
||||||
Result := ActiveSourceWindow;
|
Result := ActiveSourceWindow;
|
||||||
if Result = nil then
|
if Result <> nil then exit;
|
||||||
Result := CreateNewWindow(True);
|
Result := CreateNewWindow(True);
|
||||||
|
ActiveSourceWindow := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceEditorManager.SourceEditorCount: integer;
|
function TSourceEditorManager.SourceEditorCount: integer;
|
||||||
@ -7872,6 +7877,7 @@ begin
|
|||||||
SourceWindows[i].CloseFile(j);
|
SourceWindows[i].CloseFile(j);
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
|
dec(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user