mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-25 20:56:09 +02:00
Applied the idea of a patch from Darek Mazur
git-svn-id: trunk@5378 -
This commit is contained in:
parent
2f10d4e852
commit
9f86a5a31f
@ -3560,9 +3560,27 @@ begin
|
||||
end;//FIFCreateSearchForm
|
||||
|
||||
Procedure TSourceNotebook.FindInFiles(AProject: TProject);
|
||||
var
|
||||
TempEditor: TSourceEditor;
|
||||
Begin
|
||||
if FindInFilesDialog=nil then
|
||||
FindInFilesDialog:=CreateFindInFilesDialog;
|
||||
if FindInFilesDialog = nil
|
||||
then FindInFilesDialog := CreateFindInFilesDialog;
|
||||
|
||||
TempEditor := GetActiveSE;
|
||||
if TempEditor <> nil
|
||||
then with TempEditor, EditorComponent do
|
||||
begin
|
||||
if EditorOpts.FindTextAtCursor
|
||||
then begin
|
||||
if SelAvail and (BlockBegin.Y = BlockEnd.Y)
|
||||
then FindInFilesDialog.FindText := SelText
|
||||
else FindInFilesDialog.FindText := GetWordAtRowCol(CaretXY);
|
||||
end
|
||||
else begin
|
||||
FindInFilesDialog.FindText:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
if FindInFilesDialog.ShowModal=mrOk then
|
||||
begin
|
||||
SaveFindInFilesHistory(FindInFilesDialog);
|
||||
|
Loading…
Reference in New Issue
Block a user