SynEdit: Fixed line tracking for beautifier / auto-indent

git-svn-id: trunk@22416 -
This commit is contained in:
martin 2009-11-03 23:32:58 +00:00
parent ffc04c57b2
commit 5b91fa1c1e

View File

@ -4570,12 +4570,15 @@ begin
IncreaseChangeStamp;
if (AIndex < FBeautifyStartLineIdx) or (FBeautifyStartLineIdx < 0) then
FBeautifyStartLineIdx := AIndex;
if (AIndex + ACount - 1 >= FBeautifyEndLineIdx) then
FBeautifyEndLineIdx := AIndex + ACount - 1
else begin
if ACount > 0 then begin
if (AIndex > FBeautifyEndLineIdx) then
FBeautifyEndLineIdx := AIndex + ACount - 1
else
FBeautifyEndLineIdx := FBeautifyEndLineIdx + ACount;
end else begin
FBeautifyEndLineIdx := FBeautifyEndLineIdx + ACount;
if (AIndex + ACount - 1 < FBeautifyStartLineIdx) then
FBeautifyStartLineIdx := FBeautifyStartLineIdx + ACount;
if (FBeautifyEndLineIdx < AIndex) then
FBeautifyEndLineIdx := AIndex;
end;
if PaintLock>0 then begin
if (fHighlighterNeedsUpdateStartLine<1)