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