* 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:
Jonas Maebe 2010-05-08 11:29:25 +00:00
parent cddb2ffcae
commit 45c813929a
3 changed files with 19 additions and 1 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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.