mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Soft reset sequence
This commit is contained in:
parent
9d3682bd5d
commit
db3250b905
2 changed files with 23 additions and 14 deletions
|
|
@ -66,7 +66,7 @@ type
|
|||
FTabs: Pointer;
|
||||
FTopLeft: TPoint;
|
||||
FCaretPos: TPoint;
|
||||
FScrollRange: TPoint;
|
||||
FScrollRange: TRect;
|
||||
FOwner: TCustomComTerminal;
|
||||
strict private
|
||||
FRows: Integer;
|
||||
|
|
@ -522,18 +522,20 @@ var
|
|||
DstAddr: Pointer;
|
||||
SrcAddr: Pointer;
|
||||
BytesToMove: Integer;
|
||||
Top, Bottom: Integer;
|
||||
Top, Bottom, Height: Integer;
|
||||
begin
|
||||
if FScrollRange.X > 0 then
|
||||
Top:= FScrollRange.X
|
||||
if FScrollRange.Top > 0 then
|
||||
Top:= FScrollRange.Top
|
||||
else begin
|
||||
Top:= 1;
|
||||
end;
|
||||
if FScrollRange.Y > 0 then
|
||||
Bottom:= FScrollRange.Y
|
||||
if FScrollRange.Bottom > 0 then
|
||||
Bottom:= FScrollRange.Bottom
|
||||
else begin
|
||||
Bottom:= FRows;
|
||||
end;
|
||||
Height:= Bottom - Top + 1;
|
||||
if Count > Height then Count:= Height;
|
||||
|
||||
DstAddr := (FBuffer + (Row - 1) * FColumns * SizeOf(TComTermChar));
|
||||
SrcAddr := (FBuffer + (Row + Count - 1) * FColumns * SizeOf(TComTermChar));
|
||||
|
|
@ -564,18 +566,20 @@ var
|
|||
DstAddr: Pointer;
|
||||
SrcAddr: Pointer;
|
||||
BytesToMove: Integer;
|
||||
Top, Bottom: Integer;
|
||||
Top, Bottom, Height: Integer;
|
||||
begin
|
||||
if FScrollRange.X > 0 then
|
||||
Top:= FScrollRange.X
|
||||
if FScrollRange.Top > 0 then
|
||||
Top:= FScrollRange.Top
|
||||
else begin
|
||||
Top:= 1;
|
||||
end;
|
||||
if FScrollRange.Y > 0 then
|
||||
Bottom:= FScrollRange.Y
|
||||
if FScrollRange.Bottom > 0 then
|
||||
Bottom:= FScrollRange.Bottom
|
||||
else begin
|
||||
Bottom:= FRows;
|
||||
end;
|
||||
Height:= Bottom - Top + 1;
|
||||
if Count > Height then Count:= Height;
|
||||
|
||||
SrcAddr := (FBuffer + (Row - 1) * FColumns * SizeOf(TComTermChar));
|
||||
DstAddr := (FBuffer + (Row + Count - 1) * FColumns * SizeOf(TComTermChar));
|
||||
|
|
@ -1774,11 +1778,15 @@ begin
|
|||
ecTest: PerformTest('E');
|
||||
ecScrollRegion:
|
||||
begin
|
||||
FBuffer.FScrollRange.X:= GetParam(1, AParams);
|
||||
FBuffer.FScrollRange.Y:= GetParam(2, AParams);
|
||||
FBuffer.FScrollRange.Top:= GetParam(1, AParams);
|
||||
FBuffer.FScrollRange.Bottom:= GetParam(2, AParams);
|
||||
end;
|
||||
ecInsertLine: FBuffer.InsertLine(FCaretPos.Y, GetParam(1, AParams));
|
||||
ecDeleteLine: FBuffer.DeleteLine(FCaretPos.Y, GetParam(1, AParams));
|
||||
ecSoftReset:
|
||||
begin
|
||||
FBuffer.FScrollRange:= Default(TRect);
|
||||
end
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ type
|
|||
ecEraseLine, ecEraseScreen, ecEraseChar, ecSetTab, ecClearTab, ecClearAllTabs,
|
||||
ecIdentify, ecIdentResponse, ecQueryDevice, ecReportDeviceOK,
|
||||
ecReportDeviceFailure, ecQueryCursorPos, ecReportCursorPos,
|
||||
ecAttributes, ecSetMode, ecResetMode, ecReset, ecCharSet,
|
||||
ecAttributes, ecSetMode, ecResetMode, ecReset, ecCharSet, ecSoftReset,
|
||||
ecSaveCaretAndAttr, ecRestoreCaretAndAttr, ecSaveCaret, ecRestoreCaret,
|
||||
ecTest, ecFuncKey, ecSetTextParams, ecScrollRegion, ecDeleteLine,
|
||||
ecInsertLine, ecKeypadApp, ecKeypadNum, ecScrollUp, ecScrollDown);
|
||||
|
|
@ -524,6 +524,7 @@ begin
|
|||
'T': Result := ecScrollDown;
|
||||
'L': Result := ecInsertLine;
|
||||
'M': Result := ecDeleteLine;
|
||||
'p': Result := ecSoftReset;
|
||||
else
|
||||
Result := ecUnknown;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue