diff --git a/TSSVRAPI.DLL b/TSSVRAPI.DLL index ca81954..7746e29 100644 Binary files a/TSSVRAPI.DLL and b/TSSVRAPI.DLL differ diff --git a/funcext/tvclib/utslmemo.tsf b/funcext/tvclib/utslmemo.tsf index b5cf029..bfef8dd 100644 --- a/funcext/tvclib/utslmemo.tsf +++ b/funcext/tvclib/utslmemo.tsf @@ -2923,13 +2923,15 @@ type TSynCompletion = class(TSynCompletionList) begin if M<>FMemo then begin + tm := FMemo; + if tm then tm.Completion := nil; FMemo := M; IF M IS CLASS(TSynCustomMemo) then begin M.Completion:= self(true); end else FMemo:= nil; parent := FMemo; - FJump.Parent := FMemo; + FJump.Parent := FMemo; //if FJump.Parent<>FMemo then FJump.Parent := FMemo; end end @@ -3079,6 +3081,7 @@ type TSynHighLighter = class(TComponent) // if Memo<>M then begin tfm := FMemo; + if tfm then tfm.Highlighter := nil; FMemo := M; if M is Class(TSynCustomMemo) then begin @@ -3089,7 +3092,7 @@ type TSynHighLighter = class(TComponent) // FMemo := nil; Flines := nil; end - if tfm is Class(TSynCustomMemo) then tfm.Highlighter := nil; + //if tfm is Class(TSynCustomMemo) then tfm.Highlighter := nil; SetInValidateIndex(1); end end diff --git a/funcext/tvclib/utslvclauxiliary.tsf b/funcext/tvclib/utslvclauxiliary.tsf index 9c3e41d..16e0bad 100644 --- a/funcext/tvclib/utslvclauxiliary.tsf +++ b/funcext/tvclib/utslvclauxiliary.tsf @@ -1130,7 +1130,7 @@ type tnumindexarrayex = class(tnumindexarray) end //ifdef newgetop type trefarray = class() //数组成员引用模拟 - function create(d,bidxs); //构造函数 + function create(d); //构造函数 begin if ifarray(d) or (d is class(trefarray)) then begin @@ -1138,23 +1138,16 @@ type trefarray = class() // end else begin FData := array(); - end - if ifarray(bidxs) then - begin - FBindexs := bidxs; - end else - begin - FBindexs := array(); - end + end end function mgset(idxs,v); //根据下标设置值 begin if not ifarray(idxs) then return nil; if ifarray(FData) then begin - return magicsetarray(FData,FBindexs union idxs,v); + return magicsetarray(FData, idxs,v); end - return FData.mgset(FBindexs union idxs,v); + return FData.mgset(idxs,v); end function mgget(idxs); //根据获得值 begin @@ -1163,7 +1156,7 @@ type trefarray = class() // begin return magicgetarray(FData,idxs); end - return FData.mgget(FBindexs union idxs,v); + return FData.mgget(idxs,v); end function operator[0](idx,v); //获取值 begin @@ -1181,9 +1174,18 @@ type trefarray = class() // end return mgset(array(idx),v); //一级直接返回 end + published + property data read FData write setdata; private //成员变量 FData; - FBindexs; + private + function setdata(d); + begin + if FData<>d and ifarray(d) then + begin + FData := d; + end + end private //中间对象 type trefsgter = class() function create(a,idx); @@ -1737,13 +1739,11 @@ type TTire = class() @explan(说明) tire树 **} type TTireNode = class() - [weakref] parent; FChar; FSub; FEnd; Ficase; _tag; - _tag2; function Create(v); begin FChar := v; @@ -1761,7 +1761,6 @@ type TTire = class() vsub := new TTireNode(v0); vsub.Ficase := Ficase; FSub[v0] := vsub; - vsub.Parent := self; end ls := length(s); if ls>1 then @@ -2308,9 +2307,14 @@ type tstr_step_match=class() {** @explan(说明)字符串数组匹配 %% **} + private + const find_end="end"; + public function create(its); //送入匹配的字符串数组 begin - fits := array(); + fits := array(); + fcaches := array(); + fcaches[""] := array(); set_items(its); end function step_find_idx(s:string); //匹配的序号 @@ -2320,19 +2324,21 @@ type tstr_step_match=class() @param(s)(string) 匹配的目标 %% @return(array of integer) 成功的位置 %% **} - if not ftree then return array(); - o := ftree.find_node(s,idx); - if o and ((idx-1)=length(s)) then return o._tag; - if not o then o := ftree.FRoot; - for i := idx to length(s) do + if fcaches[s] then return fcaches[s]; //完全 + osi := fcaches[""]; + for i:= 1 to length(s) do begin si := s[1:i]; - oi := ftree.add(si); - asi := get_same_idexs(si,o._tag); - oi._tag := asi; - o := oi; + if fcaches[si] then + begin + osi := fcaches[si]; + continue; + end + osi := get_same_idexs(si,osi); + if not ifarray(osi) then osi := array(); + fcaches[si] := osi; end - return o._tag; + return fcaches[s]; end function step_find(s); //查找匹配的字符 begin @@ -2343,8 +2349,8 @@ type tstr_step_match=class() if fits<> its and check_legal(its) then begin fits := its; - ftree := new TTire(); - ftree.FRoot._tag := mrows(fits,1); + fcaches := array(); + fcaches[""] := mrows(fits,1); end end private @@ -2371,7 +2377,8 @@ type tstr_step_match=class() end protected fits; //原始数据 - ftree; + fcaches; + fcacheslen; private end implementation diff --git a/plugin/TSLUIL.dll b/plugin/TSLUIL.dll index f0cfb4f..7b7f221 100644 Binary files a/plugin/TSLUIL.dll and b/plugin/TSLUIL.dll differ