This commit is contained in:
Peter P. Lupo 2026-06-20 04:59:11 +00:00 committed by GitHub
commit 10bb202899
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1235 additions and 57 deletions

View file

@ -10,7 +10,7 @@ set -e
# release - compile in release mode (using by default)
# path to lazbuild
export lazbuild=$(which lazbuild)
export lazbuild="$(which lazbuild) --pcp=$(pwd)/.lazarus --lazarusdir=/usr/lib/lazarus"
# Set up widgetset: gtk2 or qt or qt5 or cocoa
# Set up processor architecture: i386 or x86_64

View file

@ -62,6 +62,7 @@ type
function WriteStr(const Str: string): Integer; override;
function SetCurrentDir(const Path: String): Boolean; override;
function SetScreenSize(aCols, aRows: Integer): Boolean; override;
function GetChildPid: THandle; override;
end;
implementation
@ -160,6 +161,8 @@ begin
if FChildPid = 0 then
begin
FileCloseOnExecAll;
if FInitialDir <> '' then
fpChdir(FInitialDir);
setenv('TERM', 'xterm-256color', 1);
execl(PAnsiChar(cmd), PAnsiChar(cmd), nil);
Errors.PError('execl() failed. Command: '+ cmd, cerrno);
@ -203,18 +206,24 @@ function TPtyDevice.SetScreenSize(aCols, aRows: Integer): Boolean;
var
ws: TWinSize;
begin
ws.ws_row:= aRows;
ws.ws_col:= aCols;
ws.ws_xpixel:= 0;
ws.ws_ypixel:= 0;
FCols:= aCols;
FRows:= aRows;
Result:= FpIOCtl(Fpty,TIOCSWINSZ,@ws) = 0;
if Result then
if FConnected then
begin
FCols:= aCols;
FRows:= aRows;
end;
ws.ws_row:= aRows;
ws.ws_col:= aCols;
ws.ws_xpixel:= 0;
ws.ws_ypixel:= 0;
Result:= FpIOCtl(Fpty,TIOCSWINSZ,@ws) = 0;
end
else
Result:= True;
end;
function TPtyDevice.GetChildPid: THandle;
begin
Result := FChildPid;
end;
end.

View file

@ -25,7 +25,7 @@ interface
uses
LCLType, Classes, Controls, StdCtrls, ExtCtrls, Forms, Messages, Graphics,
VTEmuEsc, LCLIntf, Types, LazUtf8, LMessages;
VTEmuEsc, LCLIntf, Types, LazUtf8, LMessages, Clipbrd;
type
@ -37,14 +37,18 @@ type
protected
FOnRxBuf: TOnRxBuf;
FConnected: Boolean;
FInitialDir: String;
protected
procedure SetConnected(AValue: Boolean); virtual; abstract;
public
function WriteStr(const Str: string): Integer; virtual; abstract;
function SetCurrentDir(const Path: String): Boolean; virtual; abstract;
function SetScreenSize(aCols, aRows: Integer): Boolean; virtual; abstract;
function GetChildPid: THandle; virtual; abstract;
property ChildPid: THandle read GetChildPid;
property OnRxBuf: TOnRxBuf read FOnRxBuf write FOnRxBuf;
property Connected: Boolean read FConnected write SetConnected default False;
property InitialDir: String read FInitialDir write FInitialDir;
end;
TCustomComTerminal = class; // forward declaration
@ -71,12 +75,18 @@ type
strict private
FRows: Integer;
FColumns: Integer;
FHistory: array[0..99] of Pointer;
FHistoryHead: Integer;
FHistoryCount: Integer;
public
constructor Create(AOwner: TCustomComTerminal);
destructor Destroy; override;
procedure Init(ARows, AColumns: Integer);
procedure SetChar(Column, Row: Integer; TermChar: TComTermChar);
function GetChar(Column, Row: Integer): TComTermChar;
function GetHistoryChar(Column, HistRow: Integer): TComTermChar;
procedure PushHistoryLine(LineData: PByte);
function GetHistoryCount: Integer;
procedure SetTab(Column: Integer; Put: Boolean);
function GetTab(Column: Integer): Boolean;
function NextTab(Column: Integer): Integer;
@ -154,6 +164,9 @@ type
FTopLeft: TPoint;
FCaretHeight: Integer;
FSaveAttr: TTermAttributes;
FSelecting: Boolean;
FSelStart: TPoint;
FSelEnd: TPoint;
FBuffer: TComTermBuffer;
FMainBuffer: TComTermBuffer;
FAlternateBuffer: TComTermBuffer;
@ -188,6 +201,7 @@ type
procedure SetMode(AParams: TStrings; OnOff: Boolean);
procedure ShowCaret;
procedure StringReceived(Str: string);
function IsSelected(AColumn, ARow: Integer): Boolean;
procedure PaintTerminal(Rect: TRect);
procedure PaintDesign;
procedure PutChar(Ch: TUTF8Char);
@ -221,6 +235,7 @@ type
procedure KeyPress(var Key: Char); override;
procedure UTF8KeyPress(var UTF8Key: TUTF8Char); override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure CreateWnd; override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
@ -238,6 +253,7 @@ type
procedure MoveCaret(AColumn, ARow: Integer);
procedure Write(const Buffer:string; Size: Integer);
procedure WriteStr(const Str: string);
procedure CopyToClipboard;
procedure WriteEscCode(ACode: TEscapeCode; AParams: TStrings);
procedure LoadFromStream(Stream: TStream);
procedure SaveToStream(Stream: TStream);
@ -351,16 +367,25 @@ const
// create class
constructor TComTermBuffer.Create(AOwner: TCustomComTerminal);
var
I: Integer;
begin
inherited Create;
FOwner := AOwner;
FTopLeft := Classes.Point(1, 1);
FCaretPos := Classes.Point(1, 1);
for I := 0 to 99 do FHistory[I] := nil;
FHistoryCount := 0;
FHistoryHead := 0;
end;
// destroy class
destructor TComTermBuffer.Destroy;
var
I: Integer;
begin
for I := 0 to 99 do
if FHistory[I] <> nil then FreeMem(FHistory[I]);
if FBuffer <> nil then
begin
FreeMem(FBuffer);
@ -393,9 +418,49 @@ begin
Result:= PComTermChar(FBuffer + (Address * SizeOf(TComTermChar)))^;
end;
function TComTermBuffer.GetHistoryCount: Integer;
begin
Result := FHistoryCount;
end;
function TComTermBuffer.GetHistoryChar(Column, HistRow: Integer): TComTermChar;
var
Index: Integer;
LineData: PComTermChar;
begin
if (Column > FColumns) or (HistRow < 1) or (HistRow > FHistoryCount) then
Exit(Default(TComTermChar));
Index := (FHistoryHead - HistRow + 100) mod 100;
LineData := PComTermChar(FHistory[Index]);
if LineData <> nil then
Result := LineData[Column - 1]
else
Result := Default(TComTermChar);
end;
procedure TComTermBuffer.PushHistoryLine(LineData: PByte);
var
LineSize: Integer;
begin
LineSize := FColumns * SizeOf(TComTermChar);
if FHistory[FHistoryHead] = nil then
GetMem(FHistory[FHistoryHead], LineSize);
Move(LineData^, FHistory[FHistoryHead]^, LineSize);
FHistoryHead := (FHistoryHead + 1) mod 100;
if FHistoryCount < 100 then
Inc(FHistoryCount);
end;
// scroll down up line
procedure TComTermBuffer.ScrollDown;
var
LineData: PByte;
begin
if FScrollRange.Top = 1 then
begin
LineData := FBuffer;
PushHistoryLine(LineData);
end;
DeleteLine(FScrollRange.Top, 1);
end;
@ -862,6 +927,8 @@ begin
I+= L;
end;
finally
UpdateScrollRange;
UpdateScrollPos;
ShowCaret;
end;
end;
@ -1096,6 +1163,28 @@ var
begin
inherited KeyDown(Key, Shift);
// Copy: Ctrl+Shift+C or Ctrl+Insert
if ((Key = VK_C) and (ssCtrl in Shift) and (ssShift in Shift)) or
((Key = VK_INSERT) and (ssCtrl in Shift)) then
begin
CopyToClipboard;
Key := 0;
Exit;
end;
// Paste: Ctrl+Shift+V or Shift+Insert
if ((Key = VK_V) and (ssCtrl in Shift) and (ssShift in Shift)) or
((Key = VK_INSERT) and (ssShift in Shift)) then
begin
if Clipboard.HasFormat(CF_TEXT) then
begin
if (FPtyDevice <> nil) and (FPtyDevice.Connected) then
FPtyDevice.WriteStr(Clipboard.AsText);
end;
Key := 0;
Exit;
end;
if (Key in [VK_TAB, VK_ESCAPE]) then
begin
SendChar(Chr(Key));
@ -1185,13 +1274,49 @@ procedure TCustomComTerminal.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
inherited MouseDown(Button, Shift, X, Y);
if (not (FTermMode.MouseMode and FTermMode.MouseTrack)) and (Button = mbLeft) then
begin
FSelecting := True;
FSelStart.X := X div FFontWidth + FTopLeft.X;
FSelStart.Y := Y div FFontHeight + FTopLeft.Y;
FSelEnd := FSelStart;
Invalidate;
end;
MouseEvent(ecMouseDown, Button, Shift, X, Y);
end;
procedure TCustomComTerminal.MouseMove(Shift: TShiftState; X, Y: Integer);
begin
inherited MouseMove(Shift, X, Y);
if FSelecting then
begin
FSelEnd.X := X div FFontWidth + FTopLeft.X;
FSelEnd.Y := Y div FFontHeight + FTopLeft.Y;
if FSelEnd.X < 1 then FSelEnd.X := 1;
if FSelEnd.X > FColumns then FSelEnd.X := FColumns;
Invalidate;
end;
end;
procedure TCustomComTerminal.MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
inherited MouseUp(Button, Shift, X, Y);
if FSelecting and (Button = mbLeft) then
begin
FSelecting := False;
FSelEnd.X := X div FFontWidth + FTopLeft.X;
FSelEnd.Y := Y div FFontHeight + FTopLeft.Y;
Invalidate;
end
else if (not FSelecting) and (Button in [mbMiddle, mbRight]) then
begin
if Clipboard.HasFormat(CF_TEXT) then
begin
if (FPtyDevice <> nil) and (FPtyDevice.Connected) then
FPtyDevice.WriteStr(Clipboard.AsText);
end;
end;
MouseEvent(ecMouseUp, Button, Shift, X, Y);
end;
@ -1229,7 +1354,15 @@ begin
for I := Rect.Left to Rect.Right do
begin
X := I + FTopLeft.X - 1;
Ch := FBuffer.GetChar(X, Y);
if Y < 1 then
Ch := FBuffer.GetHistoryChar(X, 1 - Y)
else
Ch := FBuffer.GetChar(X, Y);
if IsSelected(X, Y) then
begin
Ch.BackColor := clHighlight;
Ch.FrontColor := clHighlightText;
end;
if Ch.Ch <> Chr(0) then
DrawChar(I, J, Ch);
end;
@ -1325,6 +1458,73 @@ begin
end;
end;
function TCustomComTerminal.IsSelected(AColumn, ARow: Integer): Boolean;
var
SY1, SY2, SX1, SX2: Integer;
begin
if not FSelecting and (FSelStart.Y = 0) and (FSelEnd.Y = 0) then Exit(False);
if (FSelStart.Y < FSelEnd.Y) or ((FSelStart.Y = FSelEnd.Y) and (FSelStart.X <= FSelEnd.X)) then
begin
SY1 := FSelStart.Y; SX1 := FSelStart.X;
SY2 := FSelEnd.Y; SX2 := FSelEnd.X;
end else
begin
SY1 := FSelEnd.Y; SX1 := FSelEnd.X;
SY2 := FSelStart.Y; SX2 := FSelStart.X;
end;
if (ARow > SY1) and (ARow < SY2) then
Result := True
else if SY1 = SY2 then
Result := (ARow = SY1) and (AColumn >= SX1) and (AColumn <= SX2)
else if ARow = SY1 then
Result := AColumn >= SX1
else if ARow = SY2 then
Result := AColumn <= SX2
else
Result := False;
end;
procedure TCustomComTerminal.CopyToClipboard;
var
SY1, SY2, SX1, SX2: Integer;
R, C: Integer;
S: String;
Ch: TComTermChar;
begin
if (FSelStart.X = 0) and (FSelStart.Y = 0) and (FSelEnd.X = 0) and (FSelEnd.Y = 0) then Exit;
if (FSelStart.Y < FSelEnd.Y) or ((FSelStart.Y = FSelEnd.Y) and (FSelStart.X <= FSelEnd.X)) then
begin
SY1 := FSelStart.Y; SX1 := FSelStart.X;
SY2 := FSelEnd.Y; SX2 := FSelEnd.X;
end else
begin
SY1 := FSelEnd.Y; SX1 := FSelEnd.X;
SY2 := FSelStart.Y; SX2 := FSelStart.X;
end;
S := '';
for R := SY1 to SY2 do
begin
for C := 1 to FColumns do
begin
if IsSelected(C, R) then
begin
if R < 1 then
Ch := FBuffer.GetHistoryChar(C, 1 - R)
else
Ch := FBuffer.GetChar(C, R);
if Ch.Ch = #0 then S := S + ' '
else S := S + Ch.Ch;
end;
end;
if R < SY2 then S := S + LineEnding;
end;
Clipboard.AsText := S;
end;
// move caret after new char is put on screen
procedure TCustomComTerminal.AdvanceCaret(Kind: TAdvanceCaret);
var
@ -1365,8 +1565,8 @@ begin
begin
if (FCaretPos.Y - FTopLeft.Y) >= FVisibleRows then
begin
I:= FCaretPos.Y - FVisibleRows + 1;
ModifyScrollBar(SB_Vert, SB_THUMBPOSITION, I);
I := FCaretPos.Y - FVisibleRows + 1;
ModifyScrollBar(SB_VERT, SB_THUMBPOSITION, I - 1 + FBuffer.GetHistoryCount);
end;
end;
end;
@ -1551,7 +1751,7 @@ begin
Dy := 0;
end else
begin
FTopLeft.Y := APos + 1;
FTopLeft.Y := APos + 1 - FBuffer.GetHistoryCount;
Dx := 0;
Dy := (OldPos - APos) * FFontHeight;
end;
@ -1570,7 +1770,7 @@ begin
end;
if FScrollBars in [ssBoth, ssVertical] then
begin
SetScrollPos(Handle, SB_VERT, FTopLeft.Y - 1, True);
SetScrollPos(Handle, SB_VERT, FTopLeft.Y - 1 + FBuffer.GetHistoryCount, True);
end;
end;
@ -1633,11 +1833,11 @@ var
if OldScrollBars in [ssBoth, ssVertical] then
begin
ARows := AHeight div FFontHeight;
if ARows >= FBuffer.Rows then
if (ARows >= FBuffer.Rows) and (FBuffer.GetHistoryCount = 0) then
SetRange(SB_VERT, 1) // screen is high enough, hide scroll bar
else
begin
Max := FBuffer.Rows - (ARows - 1);
Max := FBuffer.Rows + FBuffer.GetHistoryCount - (ARows - 1);
SetRange(SB_VERT, Max);
end;
end;
@ -2070,6 +2270,13 @@ var
end;
begin
// Skip visual processing when the terminal has no parent (e.g. inactive
// tab in per-tab terminal mode). StringReceived calls DrawChar which
// accesses Canvas/Handle; doing so on a parentless Qt6 widget causes
// an EAccessViolation crash (e.g. during thumbnail rendering).
if not Assigned(Parent) then
Exit;
if (Length(FPartChar) = 0) then
begin
SetLength(Str, Count);

View file

@ -58,6 +58,7 @@ type
function WriteStr(const Str: string): Integer; override;
function SetCurrentDir(const Path: String): Boolean; override;
function SetScreenSize(aCols, aRows: Integer): Boolean; override;
function GetChildPid: THandle; override;
end;
implementation
@ -470,5 +471,10 @@ end;
initialization
Initialize;
function TPtyDevice.GetChildPid: THandle;
begin
Result := 0; // Not fully implemented for Windows pseudo console here
end;
end.

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,9 @@
inherited frmOptionsLayout: TfrmOptionsLayout
Height = 550
Height = 650
Width = 784
HelpKeyword = '/configuration.html#ConfigLayout'
ClientHeight = 550
AutoSize = True
ClientHeight = 650
ClientWidth = 784
DesignLeft = 276
DesignTop = 44
@ -12,7 +13,7 @@ inherited frmOptionsLayout: TfrmOptionsLayout
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 530
Height = 630
Top = 6
Width = 772
Anchors = [akTop, akLeft, akRight]
@ -21,7 +22,7 @@ inherited frmOptionsLayout: TfrmOptionsLayout
Caption = ' Screen layout '
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ClientHeight = 512
ClientHeight = 612
ClientWidth = 768
TabOrder = 0
object cbShowMainMenu: TCheckBox
@ -190,8 +191,33 @@ inherited frmOptionsLayout: TfrmOptionsLayout
Width = 152
BorderSpacing.Top = 2
Caption = 'Show te&rminal window'
OnChange = cbTermWindowChange
TabOrder = 18
end
object rgTermMode: TRadioGroup
AnchorSideLeft.Control = cbTermWindow
AnchorSideTop.Control = cbTermWindow
AnchorSideTop.Side = asrBottom
Left = 28
AutoSize = True
BorderSpacing.Left = 16
BorderSpacing.Top = 2
Caption = 'Terminal mode'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
Items.Strings = (
'Single shared terminal'
'Terminal per panel'
'Terminal per tab'
)
TabOrder = 19
end
object cbFreespaceInd: TCheckBox
AnchorSideTop.Control = cbShowShortDriveFreeSpace
AnchorSideTop.Side = asrBottom
@ -204,26 +230,26 @@ inherited frmOptionsLayout: TfrmOptionsLayout
TabOrder = 9
end
object cbProgInMenuBar: TCheckBox
AnchorSideTop.Control = cbTermWindow
AnchorSideTop.Control = rgTermMode
AnchorSideTop.Side = asrBottom
Left = 12
Height = 22
Top = 460
Top = 562
Width = 236
BorderSpacing.Top = 2
Caption = 'Show common progress in menu bar'
TabOrder = 19
TabOrder = 20
end
object cbPanelOfOperations: TCheckBox
AnchorSideTop.Control = cbProgInMenuBar
AnchorSideTop.Side = asrBottom
Left = 12
Height = 22
Top = 484
Top = 586
Width = 248
BorderSpacing.Top = 2
Caption = 'Show panel of operation in background'
TabOrder = 20
TabOrder = 21
end
object cbShowDriveFreeSpace: TCheckBox
AnchorSideTop.Control = cbShowDrivesListButton

View file

@ -27,7 +27,7 @@ unit fOptionsLayout;
interface
uses
Classes, SysUtils, StdCtrls,
Classes, SysUtils, StdCtrls, ExtCtrls,
fOptionsFrame;
type
@ -53,12 +53,14 @@ type
cbShowTabHeader: TCheckBox;
cbShowTabs: TCheckBox;
cbTermWindow: TCheckBox;
rgTermMode: TRadioGroup;
cbTwoDiskPanels: TCheckBox;
cbShowShortDriveFreeSpace: TCheckBox;
chkShowMiddleToolBar: TCheckBox;
gbScreenLayout: TGroupBox;
procedure cbShowDiskPanelChange(Sender: TObject);
procedure cbShowDriveFreeSpaceChange(Sender: TObject);
procedure cbTermWindowChange(Sender: TObject);
protected
procedure Load; override;
function Save: TOptionsEditorSaveFlags; override;
@ -88,6 +90,11 @@ begin
if not(cbShowDriveFreeSpace.Checked) then cbShowShortDriveFreeSpace.Checked:= false;
end;
procedure TfrmOptionsLayout.cbTermWindowChange(Sender: TObject);
begin
rgTermMode.Enabled := cbTermWindow.Checked;
end;
class function TfrmOptionsLayout.GetIconIndex: Integer;
begin
Result := 7;
@ -116,6 +123,8 @@ begin
cbFlatInterface.Checked := gInterfaceFlat;
cbLogWindow.Checked := gLogWindow;
cbTermWindow.Checked := gTermWindow;
rgTermMode.ItemIndex := gTermWindowMode;
rgTermMode.Enabled := gTermWindow;
cbShowDriveFreeSpace.Checked := gDriveFreeSpace;
cbFreespaceInd.Checked := gDriveInd;
cbProgInMenuBar.Checked := gProgInMenuBar;
@ -143,6 +152,7 @@ begin
gInterfaceFlat := cbFlatInterface.Checked;
gLogWindow := cbLogWindow.Checked;
gTermWindow := cbTermWindow.Checked;
gTermWindowMode := rgTermMode.ItemIndex;
gDriveFreeSpace := cbShowDriveFreeSpace.Checked;
gDriveInd := cbFreespaceInd.Checked;
gProgInMenuBar := cbProgInMenuBar.Checked;

View file

@ -36,7 +36,7 @@ interface
uses
Classes, SysUtils, Controls, ComCtrls, LMessages,
LCLType, Forms,
uFileView, uFilePanelSelect, DCXmlConfig;
uFileView, uFilePanelSelect, DCXmlConfig, VTEmuCtl, VTEmuPty;
type
@ -61,6 +61,11 @@ type
FBackupColumnSet: String;
FOnChangeFileView: TNotifyEvent;
FBackupViewClass: TFileViewClass;
FTerminal: TVirtualTerminal;
FPtyDevice: TCustomPtyDevice;
FTermInitialized: Boolean;
FTermNeedInit: Boolean;
FTermSyncMode: Integer;
procedure AssignPage(OtherPage: TFileViewPage);
procedure AssignProperties(OtherPage: TFileViewPage);
@ -82,6 +87,7 @@ type
procedure DoActivate;
protected
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure PaintWindow(DC: HDC); override;
{$IF DEFINED(LCLWIN32)}
procedure RealSetText(const AValue: TCaption); override;
@ -90,6 +96,7 @@ type
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
function IsActive: Boolean;
procedure MakeActive;
@ -109,6 +116,11 @@ type
property BackupColumnSet: String read FBackupColumnSet write FBackupColumnSet;
property BackupViewClass: TFileViewClass read FBackupViewClass write FBackupViewClass;
property OnChangeFileView: TNotifyEvent read FOnChangeFileView write FOnChangeFileView;
property Terminal: TVirtualTerminal read FTerminal write FTerminal;
property PtyDevice: TCustomPtyDevice read FPtyDevice write FPtyDevice;
property TermInitialized: Boolean read FTermInitialized write FTermInitialized;
property TermNeedInit: Boolean read FTermNeedInit write FTermNeedInit;
property TermSyncMode: Integer read FTermSyncMode write FTermSyncMode;
end;
{ TFileViewNotebook }
@ -230,9 +242,39 @@ constructor TFileViewPage.Create(TheOwner: TComponent);
begin
FLockState := tlsNormal;
FBackupViewClass := TColumnsFileView;
FTermSyncMode := 0;
inherited Create(TheOwner);
end;
destructor TFileViewPage.Destroy;
begin
// Terminal and PtyDevice may already be freed if their parent panel was
// destroyed before us (the Notification override nils the references).
if Assigned(FPtyDevice) then
begin
FPtyDevice.RemoveFreeNotification(Self);
FreeAndNil(FPtyDevice);
end;
if Assigned(FTerminal) then
begin
FTerminal.RemoveFreeNotification(Self);
FreeAndNil(FTerminal);
end;
inherited Destroy;
end;
procedure TFileViewPage.Notification(AComponent: TComponent; Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
if Operation = opRemove then
begin
if AComponent = FTerminal then
FTerminal := nil
else if AComponent = FPtyDevice then
FPtyDevice := nil;
end;
end;
{$IF DEFINED(LCLWIN32)}
procedure TFileViewPage.RealSetText(const AValue: TCaption);
begin

View file

@ -234,6 +234,10 @@ const
// 16 - Move DirectoryHotList to localconfig.xml
ConfigVersion = 16;
twmSingle = 0;
twmPerPanel = 1;
twmPerTab = 2;
COLORS_JSON = 'colors.json';
// Configuration related filenames
@ -310,6 +314,11 @@ var
gShortFormatDriveInfo: Boolean;
gDrivesListButtonOptions: TDrivesListButtonOptions;
gSeparateTree: Boolean;
// 0 = Detach, 1 = Sync Panel->Terminal, 2 = Sync Terminal->Panel
gTermSyncModeLeft: Integer;
gTermSyncModeRight: Integer;
gTermWindowMode: Integer;
{ Toolbar }
gMiddleToolBarFlat,
@ -2024,6 +2033,9 @@ begin
gCmdLine := True;
gLogWindow := False;
gTermWindow := False;
gTermWindowMode := twmSingle;
gTermSyncModeLeft := 0; // Detach
gTermSyncModeRight := 0; // Detach
gKeyButtons := True;
gInterfaceFlat := True;
gDriveInd := False;
@ -2960,6 +2972,12 @@ begin
gCmdLine := GetValue(Node, 'CmdLine', gCmdLine);
gLogWindow := GetValue(Node, 'LogWindow', gLogWindow);
gTermWindow := GetValue(Node, 'TermWindow', gTermWindow);
if GetValue(Node, 'TermWindowSplit', False) then
gTermWindowMode := twmPerPanel
else
gTermWindowMode := GetValue(Node, 'TermWindowMode', gTermWindowMode);
gTermSyncModeLeft := GetValue(Node, 'TermSyncModeLeft', gTermSyncModeLeft);
gTermSyncModeRight := GetValue(Node, 'TermSyncModeRight', gTermSyncModeRight);
gKeyButtons := GetValue(Node, 'KeyButtons', gKeyButtons);
gInterfaceFlat := GetValue(Node, 'InterfaceFlat', gInterfaceFlat);
gDriveFreeSpace := GetValue(Node, 'DriveFreeSpace', gDriveFreeSpace);
@ -3678,6 +3696,9 @@ begin
SetValue(Node, 'CmdLine', gCmdLine);
SetValue(Node, 'LogWindow', gLogWindow);
SetValue(Node, 'TermWindow', gTermWindow);
SetValue(Node, 'TermWindowMode', gTermWindowMode);
SetValue(Node, 'TermSyncModeLeft', gTermSyncModeLeft);
SetValue(Node, 'TermSyncModeRight', gTermSyncModeRight);
SetValue(Node, 'KeyButtons', gKeyButtons);
SetValue(Node, 'InterfaceFlat', gInterfaceFlat);
SetValue(Node, 'DriveFreeSpace', gDriveFreeSpace);

View file

@ -1,3 +0,0 @@
// Created by Git2RevisionInc
const dcRevision = 'Unknown';
const dcCommit = 'Unknown';