mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 09:49:27 +02:00
* update the coordinates properly if a string is written that exactly fills
a line (mantis #15599) git-svn-id: trunk@15241 -
This commit is contained in:
parent
cddb2ffcae
commit
45c813929a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10323,6 +10323,7 @@ tests/webtbs/tw15500.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15504.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15530.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw15592.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15599.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15607.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15610.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15619.pp svneol=native#text/plain
|
||||
|
@ -1142,7 +1142,7 @@ var
|
||||
while (SendBytes>0) do
|
||||
begin
|
||||
LeftX:=WindMaxX-CurrX+1;
|
||||
if (SendBytes>LeftX) then
|
||||
if (SendBytes>=LeftX) then
|
||||
begin
|
||||
ttyWrite(Copy(s,i-SendBytes,LeftX));
|
||||
dec(SendBytes,LeftX);
|
||||
|
17
tests/webtbs/tw15599.pp
Normal file
17
tests/webtbs/tw15599.pp
Normal file
@ -0,0 +1,17 @@
|
||||
{ %interactive }
|
||||
|
||||
{ the bug was that this put the 'x' at the *end* of the second line instead
|
||||
of on position 14 }
|
||||
|
||||
uses crt; // my terminal is 80x25
|
||||
var s:string;
|
||||
|
||||
begin
|
||||
clrscr;
|
||||
s:='';
|
||||
gotoxy(1,2); // you need this row
|
||||
while length(s)<80 do s:=s+' ';
|
||||
write(s);
|
||||
gotoxy(14,2); // you need this row
|
||||
write('x'); // position of 'x' is wrong
|
||||
end.
|
Loading…
Reference in New Issue
Block a user