mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 22:06:40 +02:00
* fixed double width character at the end of TInputLine covering the right
scroll arrow git-svn-id: branches/unicodekvm@48811 -
This commit is contained in:
parent
fe312ab99f
commit
ddd87e09ff
@ -1444,7 +1444,7 @@ END;
|
|||||||
{---------------------------------------------------------------------------}
|
{---------------------------------------------------------------------------}
|
||||||
{$ifdef FV_UNICODE}
|
{$ifdef FV_UNICODE}
|
||||||
PROCEDURE TInputLine.Draw;
|
PROCEDURE TInputLine.Draw;
|
||||||
VAR Color: Byte; L, R, SkipToFirstPosLeft, ScrPos: Sw_Integer;
|
VAR Color: Byte; L, R, SkipToFirstPosLeft, ScrPos, EGC_StrWidth: Sw_Integer;
|
||||||
B : TDrawBuffer;
|
B : TDrawBuffer;
|
||||||
EGC: Sw_String;
|
EGC: Sw_String;
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -1480,6 +1480,9 @@ BEGIN
|
|||||||
Dec(SkipToFirstPosLeft, Length(EGC))
|
Dec(SkipToFirstPosLeft, Length(EGC))
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
EGC_StrWidth := StrWidth(EGC);
|
||||||
|
if (ScrPos + EGC_StrWidth - 1) > (Size.X - 2) then
|
||||||
|
break;
|
||||||
with B[ScrPos] do
|
with B[ScrPos] do
|
||||||
begin
|
begin
|
||||||
ExtendedGraphemeCluster := EGC;
|
ExtendedGraphemeCluster := EGC;
|
||||||
@ -1488,11 +1491,9 @@ BEGIN
|
|||||||
else
|
else
|
||||||
Attribute:=Color;
|
Attribute:=Color;
|
||||||
end;
|
end;
|
||||||
Inc(ScrPos, StrWidth(EGC));
|
Inc(ScrPos, EGC_StrWidth);
|
||||||
Dec(L, Length(EGC));
|
Dec(L, Length(EGC));
|
||||||
Dec(R, Length(EGC));
|
Dec(R, Length(EGC));
|
||||||
if ScrPos > (Size.X - 2) then
|
|
||||||
break;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
WriteLine(0, 0, Size.X, Size.Y, B);
|
WriteLine(0, 0, Size.X, Size.Y, B);
|
||||||
|
Loading…
Reference in New Issue
Block a user