diff --git a/ide/findinfilesdlg.pas b/ide/findinfilesdlg.pas index d68088a90d..8400cfbeca 100644 --- a/ide/findinfilesdlg.pas +++ b/ide/findinfilesdlg.pas @@ -320,6 +320,8 @@ begin AssignToComboBox(DirectoryComboBox, InputHistories.FindInFilesPathHistory); if (SrcEdit<>nil) and (FilenameIsAbsolute(SrcEdit.FileName)) then AddFileToComboBox(DirectoryComboBox, ExtractFilePath(SrcEdit.FileName)); + if DirectoryComboBox.Items.Count>0 then + DirectoryComboBox.Text:=DirectoryComboBox.Items[0]; // show last used file masks AssignToComboBox(FileMaskComboBox, InputHistories.FindInFilesMaskHistory); Options := InputHistories.FindInFilesSearchOptions; diff --git a/lcl/stdctrls.pp b/lcl/stdctrls.pp index 5381809ecd..81647e9232 100644 --- a/lcl/stdctrls.pp +++ b/lcl/stdctrls.pp @@ -394,8 +394,8 @@ type property Items: TStrings read FItems write SetItems; property ItemIndex: integer read GetItemIndex write SetItemIndex default -1; property ReadOnly: Boolean read FReadOnly write SetReadOnly stored IsReadOnlyStored; - property SelLength: integer read GetSelLength write SetSelLength;// byte length - property SelStart: integer read GetSelStart write SetSelStart;// byte position + property SelLength: integer read GetSelLength write SetSelLength;// UTF-8 length + property SelStart: integer read GetSelStart write SetSelStart;// UTF-8 position property SelText: String read GetSelText write SetSelText; property Style: TComboBoxStyle read FStyle write SetStyle default csDropDown; property TabStop default true;