codetools: CleanPosToCaret now returns false if Buffer.IsDeleted

git-svn-id: trunk@19180 -
This commit is contained in:
mattias 2009-04-01 12:27:38 +00:00
parent 7fb37b5564
commit 804c85d283

View File

@ -2198,6 +2198,7 @@ begin
Result:=Scanner.CleanedPosToCursor(CleanPos,p,Code);
if Result then begin
Caret.Code:=TCodeBuffer(Code);
if Caret.Code.IsDeleted then exit(false);
TCodeBuffer(Code).AbsoluteToLineCol(p,Caret.Y,Caret.X);
Result:=(Caret.Y>=0);
end;