mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:00:43 +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
|
var
|
||||||
Dir: String;
|
Dir: String;
|
||||||
begin
|
begin
|
||||||
|
if ReplaceCheckBox.Checked then
|
||||||
|
InputHistories.AddToReplaceHistory(ReplaceText);
|
||||||
InputHistories.AddToFindHistory(FindText);
|
InputHistories.AddToFindHistory(FindText);
|
||||||
Dir:=AppendPathDelim(TrimFilename(DirectoriesComboBox.Text));
|
Dir:=AppendPathDelim(TrimFilename(DirectoriesComboBox.Text));
|
||||||
if Dir<>'' then
|
if Dir<>'' then
|
||||||
|
@ -8311,10 +8311,9 @@ var
|
|||||||
AnEditorInfo: TUnitEditorInfo;
|
AnEditorInfo: TUnitEditorInfo;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
if pos('(',SearchResultsView.GetSelectedText) > 0 then
|
AFileName:= SearchResultsView.GetSourceFileName;
|
||||||
|
if AFilename<>'' then
|
||||||
begin
|
begin
|
||||||
AFileName:= SearchResultsView.GetSourceFileName;
|
|
||||||
if AFilename='' then exit;
|
|
||||||
LogCaretXY:= SearchResultsView.GetSourcePositon;
|
LogCaretXY:= SearchResultsView.GetSourcePositon;
|
||||||
OpenFlags:=[ofOnlyIfExists,ofRegularFile];
|
OpenFlags:=[ofOnlyIfExists,ofRegularFile];
|
||||||
if MainBuildBoss.IsTestUnitFilename(AFilename) then begin
|
if MainBuildBoss.IsTestUnitFilename(AFilename) then begin
|
||||||
@ -8391,6 +8390,8 @@ begin
|
|||||||
SearchResultsView.DisableAutoSizing;
|
SearchResultsView.DisableAutoSizing;
|
||||||
if State>=iwgfShow then
|
if State>=iwgfShow then
|
||||||
IDEWindowCreators.ShowForm(SearchresultsView,State=iwgfShowOnTop);
|
IDEWindowCreators.ShowForm(SearchresultsView,State=iwgfShowOnTop);
|
||||||
|
if SearchresultsView.SearchInListEdit.CanFocus then
|
||||||
|
SearchresultsView.SearchInListEdit.SetFocus;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.GetTestBuildDirectory: string;
|
function TMainIDE.GetTestBuildDirectory: string;
|
||||||
@ -10057,8 +10058,8 @@ end;
|
|||||||
|
|
||||||
function TMainIDE.DoFindInFiles: TModalResult;
|
function TMainIDE.DoFindInFiles: TModalResult;
|
||||||
begin
|
begin
|
||||||
Result:=mrOk;
|
|
||||||
FindInFilesDialog.FindInFilesPerDialog(Project1);
|
FindInFilesDialog.FindInFilesPerDialog(Project1);
|
||||||
|
Result:=FindInFilesDialog.ModalResult;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.DoCompleteCodeAtCursor;
|
procedure TMainIDE.DoCompleteCodeAtCursor;
|
||||||
|
@ -448,7 +448,8 @@ begin
|
|||||||
if Key = Char(VK_RETURN) then //SearchInListEdit passes only OnPress through
|
if Key = Char(VK_RETURN) then //SearchInListEdit passes only OnPress through
|
||||||
begin
|
begin
|
||||||
Key := #0;
|
Key := #0;
|
||||||
FOnSelectionChanged(Self);
|
if Assigned(FOnSelectionChanged) then
|
||||||
|
FOnSelectionChanged(Self);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -711,7 +712,8 @@ begin
|
|||||||
if (Key = VK_RETURN) and (Shift = []) then
|
if (Key = VK_RETURN) and (Shift = []) then
|
||||||
begin
|
begin
|
||||||
Key:=VK_UNKNOWN;
|
Key:=VK_UNKNOWN;
|
||||||
FOnSelectionChanged(Self);
|
if Assigned(FOnSelectionChanged) then
|
||||||
|
FOnSelectionChanged(Self);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user