fixed SourceChangeCache

git-svn-id: trunk@8872 -
This commit is contained in:
mattias 2006-03-06 18:53:29 +00:00
parent 55078287e1
commit 24d096e296
5 changed files with 9 additions and 3 deletions

View File

@ -541,8 +541,8 @@ begin
// this is a replace/delete operation (in cleaned code)
// -> check the whole range for writable buffers
if not MainScanner.WholeRangeIsWritable(FromPos,ToPos,true) then exit;
end
else if not IsDirectChange then begin
end;
if not IsDirectChange then begin
if not MainScanner.CleanedPosToCursor(FromPos,FromDirectPos,p) then begin
{$IFDEF CTDEBUG}
DebugLn('TSourceChangeCache.ReplaceEx IGNORED, because not in clean pos');

View File

@ -4208,7 +4208,8 @@ begin
Result:=false;
if DoBuildTree then BuildTree(true);
ACleanPos:=FindNextCompilerDirectiveWithName(Src,1,'Mode',
Scanner.NestedComments,ParamPos);
Scanner.NestedComments,ParamPos);
if ParamPos=0 then ;
Result:=(ACleanPos>0) and (ACleanPos<=SrcLen);
end;
@ -4225,6 +4226,7 @@ begin
repeat
ACleanPos:=FindNextCompilerDirectiveWithName(Src,ACleanPos,'R',
Scanner.NestedComments,ParamPos);
if ParamPos=0 then ;
if (ACleanPos<1) or (ACleanPos>SrcLen) then
exit(false);
if Filename='' then begin

View File

@ -167,6 +167,7 @@ begin
DebugLn('QuickFixUnitNotFoundPosition failed due to syntax errors');
exit;
end;
if InPos=0 then ;
CodeBuf.AbsoluteToLineCol(NamePos,Line,Col);
if (Line>0) and (Col>0) then begin
//DebugLn('QuickFixUnitNotFoundPosition Line=',dbgs(Line),' Col=',dbgs(Col));

View File

@ -3214,6 +3214,7 @@ Begin
// get value
NewValue:=GetIdentCompletionValue(aCompletion,KeyChar,
ValueType,CursorToLeft);
if ValueType=icvIdentifier then ;
// insert value plus special chars like brackets, semicolons, ...
SrcEdit:=GetActiveSE;
Editor:=SrcEdit.EditorComponent;

View File

@ -690,6 +690,8 @@ end;
procedure TMethodList.Insert(Index: integer; const AMethod: TMethod);
begin
inc(FCount);
ReAllocMem(FItems,FCount*SizeOf(TMethod));
if Index<FCount then
System.Move(FItems[Index],FItems[Index+1],(FCount-Index)*SizeOf(TMethod));
FItems[Index]:=AMethod;