search, find all, moved result to category misc and display line content

This commit is contained in:
Basile Burg 2016-01-24 04:36:24 +01:00
parent 619c169024
commit 9e3be34ce7
1 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes, Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes,
ce_common, ce_mru, ce_widget, ce_synmemo, ce_interfaces, ce_observer, ce_common, ce_mru, ce_widget, ce_synmemo, ce_interfaces, ce_observer,
ce_writableComponent, ce_dialogs; ce_writableComponent, ce_dialogs, strutils;
type type
@ -306,12 +306,12 @@ begin
end; end;
msgs := getMessageDisplay; msgs := getMessageDisplay;
msg := format('%d result(s) for the pattern <%s>', [length(res), fToFind]); msg := format('%d result(s) for the pattern <%s>', [length(res), fToFind]);
msgs.message(msg, fDoc, amcEdit, amkInf); msgs.message(msg, fDoc, amcMisc, amkInf);
fmt := fDoc.fileName + '(%d,%d): match %d'; fmt := fDoc.fileName + '(%d,%d): "%s"';
for i := 0 to high(res) do for i := 0 to high(res) do
begin begin
msg := format(fmt, [res[i].Y, res[i].X, i]); msg := format(fmt, [res[i].Y, res[i].X, Trim(fDoc.Lines.Strings[res[i].Y-1])]);
msgs.message(msg, fDoc, amcEdit, amkInf); msgs.message(msg, fDoc, amcMisc, amkInf);
end; end;
finally finally
search.free; search.free;