IDE: source editor: restarting completion timer after ending completion with point, feature request 9105

git-svn-id: trunk@14211 -
This commit is contained in:
mattias 2008-02-20 14:19:06 +00:00
parent 0931f20836
commit b2affc1ca1
2 changed files with 18 additions and 6 deletions

View File

@ -3581,13 +3581,13 @@ begin
end; end;
if CompilerOptions.Modified then begin if CompilerOptions.Modified then begin
Modified:=true; Modified:=true;
DebugLn(['TProject.SomethingModified CompilerOptions']); //DebugLn(['TProject.SomethingModified CompilerOptions']);
exit; exit;
end; end;
for i:=0 to UnitCount-1 do for i:=0 to UnitCount-1 do
if (Units[i].IsPartOfProject) and Units[i].Modified then begin if (Units[i].IsPartOfProject) and Units[i].Modified then begin
Modified:=true; Modified:=true;
DebugLn('TProject.SomethingModified PartOfProject ',Units[i].Filename); //DebugLn('TProject.SomethingModified PartOfProject ',Units[i].Filename);
exit; exit;
end; end;
end; end;
@ -3599,12 +3599,12 @@ begin
for i:=0 to UnitCount-1 do begin for i:=0 to UnitCount-1 do begin
if Units[i].SessionModified then begin if Units[i].SessionModified then begin
SessionModified:=true; SessionModified:=true;
DebugLn('TProject.SomethingModified Session ',Units[i].Filename); //DebugLn('TProject.SomethingModified Session ',Units[i].Filename);
exit; exit;
end; end;
if (not Units[i].IsPartOfProject) and Units[i].Modified then begin if (not Units[i].IsPartOfProject) and Units[i].Modified then begin
SessionModified:=true; SessionModified:=true;
DebugLn('TProject.SomethingModified Not PartOfProject ',Units[i].Filename); //DebugLn('TProject.SomethingModified Not PartOfProject ',Units[i].Filename);
exit; exit;
end; end;
end; end;

View File

@ -3316,8 +3316,9 @@ begin
SourceCompletionTimer.Enabled:=false; SourceCompletionTimer.Enabled:=false;
SourceCompletionTimer.AutoEnabled:=false; SourceCompletionTimer.AutoEnabled:=false;
TempEditor:=GetActiveSE; TempEditor:=GetActiveSE;
if (TempEditor<>nil) and if (TempEditor<>nil)
(ComparePoints(TempEditor.EditorComponent.CaretXY,SourceCompletionCaretXY)=0) and (ComparePoints(TempEditor.EditorComponent.CaretXY,SourceCompletionCaretXY)=0)
and TempEditor.EditorComponent.Focused
then begin then begin
if CheckStartIdentCompletion then begin if CheckStartIdentCompletion then begin
end else if CheckTemplateCompletion then begin end else if CheckTemplateCompletion then begin
@ -3641,8 +3642,10 @@ var
CursorToLeft: integer; CursorToLeft: integer;
NewValue: String; NewValue: String;
Editor: TSynEdit; Editor: TSynEdit;
OldCompletionType: TCompletionType;
Begin Begin
if CurCompletionControl=nil then exit; if CurCompletionControl=nil then exit;
OldCompletionType:= CurrentCompletionType;
case CurrentCompletionType of case CurrentCompletionType of
ctIdentCompletion: ctIdentCompletion:
@ -3698,6 +3701,15 @@ Begin
end; end;
DeactivateCompletionForm; DeactivateCompletionForm;
//DebugLn(['TSourceNotebook.ccComplete ',KeyChar,' ',OldCompletionType=ctIdentCompletion]);
SrcEdit:=GetActiveSE;
Editor:=SrcEdit.EditorComponent;
if (KeyChar='.') and (OldCompletionType=ctIdentCompletion) then
begin
SourceCompletionCaretXY:=Editor.CaretXY;
SourceCompletionTimer.AutoEnabled:=true;
end;
End; End;
Procedure TSourceNotebook.ccCancel(Sender: TObject); Procedure TSourceNotebook.ccCancel(Sender: TObject);