编辑器
优化查找
This commit is contained in:
@@ -3956,6 +3956,7 @@ type TEditer=class(TCustomcontrol) //
|
||||
ct := 0;
|
||||
for i,v in fs do
|
||||
begin
|
||||
TryDispatch();
|
||||
if not FIsFinding then break;
|
||||
o.SetStatusText("查找文件:"+i);
|
||||
it := GetOpendPageItemByFileName(i);
|
||||
@@ -4052,7 +4053,6 @@ type TEditer=class(TCustomcontrol) //
|
||||
end
|
||||
function TryDispatch();
|
||||
begin
|
||||
|
||||
t := now();
|
||||
if(t-FLastDispathTime)>0.25e-5 then
|
||||
begin
|
||||
@@ -4080,6 +4080,7 @@ type TEditer=class(TCustomcontrol) //
|
||||
if rsult then
|
||||
begin
|
||||
rt := length(rsult);
|
||||
iits := 0;
|
||||
for i,v in rsult do
|
||||
begin
|
||||
if i=0 and (not fnoshow) then
|
||||
@@ -4092,6 +4093,12 @@ type TEditer=class(TCustomcontrol) //
|
||||
if not ifstring(v[3]) then continue;
|
||||
scap := format(" %d:(第%d行) ",i,rdx)+limitstringlength(v[3]);
|
||||
FFindListWnd.AppendItem(array("caption":scap,"file":it.OrigScriptPath,"line":rdx));
|
||||
iits++;
|
||||
if iits>80 then
|
||||
begin
|
||||
iits := 0;
|
||||
TryDispatch();
|
||||
end
|
||||
end
|
||||
end
|
||||
end else
|
||||
@@ -4274,6 +4281,7 @@ type TEditer=class(TCustomcontrol) //
|
||||
end
|
||||
function FindFiles(dir,ft,sub,ret);
|
||||
begin
|
||||
TryDispatch();
|
||||
dir_ := dir;
|
||||
sp := ioFileseparator();
|
||||
if not(dir_[length(dir_)]=sp)then dir_ += sp;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user