diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index e7ca1b6ccd..f759c53a6e 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -774,7 +774,7 @@ begin FindReplaceDlg.Top:=ATop; if (FindReplaceDlg.ShowModal = mrCancel) then begin - EditorComponent.SetFocus; + FEditor.SetFocus; exit; end; @@ -1544,10 +1544,8 @@ Begin end else begin FEditor.Parent:=AParent; end; - FEditor.SetFocus; end; - procedure TSourceEditor.SetCodeBuffer(NewCodeBuffer: TCodeBuffer); begin if NewCodeBuffer=FCodeBuffer then exit; @@ -4129,9 +4127,8 @@ begin Default:=false; Visible := True; end; - - Edit1.SetFocus; end; + ActiveControl:=Edit1; end; procedure TfrmGoto.Edit1KeyDown(Sender: TObject; var Key:Word;