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

View File

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