编辑器

优化代码树
This commit is contained in:
JianjunLiu
2023-03-27 14:03:35 +08:00
parent 0237f14153
commit ba333fba1f
3 changed files with 37 additions and 3 deletions
+18 -2
View File
@@ -4899,6 +4899,10 @@ type tfincodemap = class(tcustomcontrol)
end
function caretchanged(y);
begin
if y>=fcaretya and y<fcaretyb then //记录位置减少计算
begin
return ;
end
if fisloading then return ;
fissetnode := true;
GoToTheNode(y);
@@ -4989,7 +4993,9 @@ type tfincodemap = class(tcustomcontrol)
FString := s;
flistv := getblocktypes();
if s then r := tsl_tokenizeex_2_(s,flistv);
else r := array();
else r := array();
fcaretya := -1;
fcaretyb := -1;
fisloading := true;
nd.RecyclingChildren();
FTempNodes := array();
@@ -5024,13 +5030,21 @@ type tfincodemap = class(tcustomcontrol)
if v._tag <= line then
begin
nd := v;
fcaretya := v._tag;
end else
if v._tag >= Line then
begin
FTree.SetSel(nd);
break;
fcaretyb := v._tag;
return ;
//break;
end
end
if nd and nd._Tag<=line then
begin
FTree.SetSel(nd);
fcaretyb := line;
end
end
function ScriptDelBlocks(blcks,strs,Node,ct);
begin
@@ -5143,6 +5157,8 @@ EA5E0BB7C5850E4063EDA83420076B5E10000000049454E44AE42608200";
Ftimer;
Ftimer2;
FString;
fcaretya; //开始位置记录
fcaretyb; //截止位置记录
end
(*
type TTslCodeMap=class(TTreeView) //tsl代码地图