mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 11:08:00 +02:00
IDE: FindInFiles fixes. Issue #28293, patch from Ondrej Pokorny.
git-svn-id: trunk@49332 -
This commit is contained in:
parent
7d7d06ceb7
commit
702d8751b0
@ -369,6 +369,8 @@ procedure TLazFindInFilesDialog.SaveHistory;
|
||||
var
|
||||
Dir: String;
|
||||
begin
|
||||
if ReplaceCheckBox.Checked then
|
||||
InputHistories.AddToReplaceHistory(ReplaceText);
|
||||
InputHistories.AddToFindHistory(FindText);
|
||||
Dir:=AppendPathDelim(TrimFilename(DirectoriesComboBox.Text));
|
||||
if Dir<>'' then
|
||||
|
@ -8311,10 +8311,9 @@ var
|
||||
AnEditorInfo: TUnitEditorInfo;
|
||||
begin
|
||||
Result:=false;
|
||||
if pos('(',SearchResultsView.GetSelectedText) > 0 then
|
||||
AFileName:= SearchResultsView.GetSourceFileName;
|
||||
if AFilename<>'' then
|
||||
begin
|
||||
AFileName:= SearchResultsView.GetSourceFileName;
|
||||
if AFilename='' then exit;
|
||||
LogCaretXY:= SearchResultsView.GetSourcePositon;
|
||||
OpenFlags:=[ofOnlyIfExists,ofRegularFile];
|
||||
if MainBuildBoss.IsTestUnitFilename(AFilename) then begin
|
||||
@ -8391,6 +8390,8 @@ begin
|
||||
SearchResultsView.DisableAutoSizing;
|
||||
if State>=iwgfShow then
|
||||
IDEWindowCreators.ShowForm(SearchresultsView,State=iwgfShowOnTop);
|
||||
if SearchresultsView.SearchInListEdit.CanFocus then
|
||||
SearchresultsView.SearchInListEdit.SetFocus;
|
||||
end;
|
||||
|
||||
function TMainIDE.GetTestBuildDirectory: string;
|
||||
@ -10057,8 +10058,8 @@ end;
|
||||
|
||||
function TMainIDE.DoFindInFiles: TModalResult;
|
||||
begin
|
||||
Result:=mrOk;
|
||||
FindInFilesDialog.FindInFilesPerDialog(Project1);
|
||||
Result:=FindInFilesDialog.ModalResult;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.DoCompleteCodeAtCursor;
|
||||
|
@ -448,7 +448,8 @@ begin
|
||||
if Key = Char(VK_RETURN) then //SearchInListEdit passes only OnPress through
|
||||
begin
|
||||
Key := #0;
|
||||
FOnSelectionChanged(Self);
|
||||
if Assigned(FOnSelectionChanged) then
|
||||
FOnSelectionChanged(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -711,7 +712,8 @@ begin
|
||||
if (Key = VK_RETURN) and (Shift = []) then
|
||||
begin
|
||||
Key:=VK_UNKNOWN;
|
||||
FOnSelectionChanged(Self);
|
||||
if Assigned(FOnSelectionChanged) then
|
||||
FOnSelectionChanged(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user