From f317fb4c0c5c1e7668284888053503a59cc68be2 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Mon, 4 Sep 2023 10:44:44 +0800 Subject: [PATCH] Update utslmemo.tsf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 双击处理中文符号 --- funcext/tvclib/utslmemo.tsf | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/funcext/tvclib/utslmemo.tsf b/funcext/tvclib/utslmemo.tsf index 4eb83a5..7617406 100644 --- a/funcext/tvclib/utslmemo.tsf +++ b/funcext/tvclib/utslmemo.tsf @@ -1663,14 +1663,21 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) // while cx>1 do begin cx--; - vi := s[cx]; - if FSymchars[vi] then continue; - ivi := ord(vi); + //vi := s[cx]; + //if FSymchars[vi] then continue; + //ivi := ord(vi); + ivi := getchar(s,cx); {if (ivi<=0x2f) or (ivi>122 and ivi<=127) then begin ci++; break; - end } + end } + if ivi=0xa1 or ivi=0xa3 then //ķ + begin + cx++; + ci--; + break; + end if(ivi<48)or(ivi>57 and ivi<65)or(ivi>90 and ivi<95)or(ivi>95 and ivi<97)or(ivi>122 and ivi <= 127)then begin ci++; @@ -1693,10 +1700,15 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) // ci := 0; while cx <= ls do begin - vi := s[cx]; - if FSymchars[vi] then continue; - ivi := ord(vi); + //vi := s[cx]; + //if FSymchars[vi] then continue; + //ivi := ord(vi); + ivi := getchar(s,cx); //if (ivi<=0x2f) or (ivi>122 and ivi<=127) then break; + if ivi=0xa1 or ivi=0xa3 then //ķ + begin + break; + end if(ivi<48)or(ivi>57 and ivi<65)or(ivi>90 and ivi<95)or(ivi>95 and ivi<97)or(ivi>122 and ivi <= 127)then break; ci++; cx++;