lcl: TUTF8Parser.HandleNewLine: fill buffer

git-svn-id: trunk@31410 -
This commit is contained in:
mattias 2011-06-26 21:05:15 +00:00
parent 5b1188a3f9
commit d93e971020
3 changed files with 6 additions and 5 deletions
components/codetools/examples
ide
lcl

View File

@ -72,6 +72,9 @@
</Checks>
</CodeGeneration>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>

View File

@ -3847,7 +3847,6 @@ var
ASrcEdit: TSourceEditor;
AnUnitInfo: TUnitInfo;
Editable, SelEditable, SelAvail, IdentFound, StringFound: Boolean;
CurrentUnitName: String;
StartCode, EndCode: TCodeBuffer;
StartPos, EndPos: TPoint;
NewX, NewY, NewTopLine: integer;

View File

@ -5328,7 +5328,7 @@ var newread : integer;
begin
newread:=fStream.Read(fBuf[0],ParseBufSize);
fBuf[newread]:=#0;
fLineStart:=fPos-fLineStart;
fLineStart:=fLineStart-fPos; // column = fPos - fLineStart + 1
fPos:=0;
fBufLen:=newread;
fEofReached:=newread=0;
@ -5404,10 +5404,9 @@ begin
CheckLoadBuffer;
if fBuf[fPos]=#10 then inc(fPos); //CR LF
end
else begin
else
inc(fPos); //LF
CheckLoadBuffer;
end;
CheckLoadBuffer;
inc(fSourceLine);
fLineStart:=fPos;
end;