find all, project scope, fine tweaks

This commit is contained in:
Basile Burg 2016-01-27 01:34:31 +01:00
parent 3fdbf6b4be
commit 7d6e2863cd
2 changed files with 8 additions and 8 deletions

View File

@ -78,7 +78,7 @@ inherited CESearchWidget: TCESearchWidget
object btnReplace: TBitBtn[2]
Left = 4
Height = 24
Top = 195
Top = 231
Width = 385
Align = alBottom
BorderSpacing.Around = 4
@ -270,7 +270,7 @@ inherited CESearchWidget: TCESearchWidget
object Panel2: TPanel[6]
Left = 0
Height = 32
Top = 223
Top = 195
Width = 393
Align = alBottom
BevelOuter = bvNone

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes,
ce_common, ce_mru, ce_widget, ce_synmemo, ce_interfaces, ce_observer,
ce_writableComponent, ce_dialogs, ce_sharedres;
ce_writableComponent, ce_dialogs, ce_sharedres, SynEditTextBuffer;
type
@ -287,7 +287,7 @@ end;
procedure TCESearchWidget.actFindAllExecute(sender: TObject);
var
i: integer;
syn: TSynEdit;
lst: TSynEditStringList;
fnm: string;
begin
if fDoc.isNil and not fAllInProj then
@ -300,16 +300,16 @@ begin
//
if fAllInProj then
begin
syn := TSynEdit.Create(nil);
lst := TSynEditStringList.Create;
try
for i := 0 to fProj.sourcesCount-1 do
begin
fnm := fProj.sourceAbsolute(i);
syn.Lines.LoadFromFile(fnm);
findAll(fnm, syn.Lines);
lst.LoadFromFile(fnm);
findAll(fnm, lst);
end;
finally
syn.Free;
lst.Free;
end;
end
else findAll(fDoc.fileName, fDoc.Lines);