mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 05:49:23 +02:00
* fixed ttyWrite() with #8
This commit is contained in:
parent
fbf69c5127
commit
8524ceeea4
@ -480,13 +480,19 @@ begin
|
|||||||
{Update MemCopy}
|
{Update MemCopy}
|
||||||
idx:=(CurrY-1)*ScreenWidth-1;
|
idx:=(CurrY-1)*ScreenWidth-1;
|
||||||
for i:=1to length(s) do
|
for i:=1to length(s) do
|
||||||
begin
|
if s[i]=#8 then
|
||||||
ConsoleBuf^[idx+CurrX].ch:=s[i];
|
begin
|
||||||
ConsoleBuf^[idx+CurrX].attr:=TextAttr;
|
if CurrX>1 then
|
||||||
inc(CurrX);
|
dec(CurrX);
|
||||||
if CurrX>ScreenWidth then
|
end
|
||||||
CurrX:=ScreenWidth;
|
else
|
||||||
end;
|
begin
|
||||||
|
ConsoleBuf^[idx+CurrX].ch:=s[i];
|
||||||
|
ConsoleBuf^[idx+CurrX].attr:=TextAttr;
|
||||||
|
inc(CurrX);
|
||||||
|
if CurrX>ScreenWidth then
|
||||||
|
CurrX:=ScreenWidth;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1203,7 +1209,6 @@ begin
|
|||||||
#8 : begin {BackSpace}
|
#8 : begin {BackSpace}
|
||||||
SendText;
|
SendText;
|
||||||
ttyWrite(#8);
|
ttyWrite(#8);
|
||||||
dec(CurrX);
|
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
inc(SendBytes);
|
inc(SendBytes);
|
||||||
@ -1486,7 +1491,10 @@ Begin
|
|||||||
End.
|
End.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 1998-10-15 08:31:53 peter
|
Revision 1.10 1998-10-27 11:13:27 peter
|
||||||
|
* fixed ttyWrite() with #8
|
||||||
|
|
||||||
|
Revision 1.9 1998/10/15 08:31:53 peter
|
||||||
+ get winsize at startup
|
+ get winsize at startup
|
||||||
+ ConsoleBuf to interface
|
+ ConsoleBuf to interface
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user