mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 15:49:27 +02:00
fixed SourceChangeCache
git-svn-id: trunk@8872 -
This commit is contained in:
parent
55078287e1
commit
24d096e296
@ -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');
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user