编辑器

优化查找
This commit is contained in:
2024-04-29 11:08:10 +08:00
parent d014530500
commit a46c3c65d1
2 changed files with 9 additions and 1 deletions
+9 -1
View File
@@ -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;
BIN
View File
Binary file not shown.