Update utslmemo.tsf

双击处理中文符号
This commit is contained in:
JianjunLiu 2023-09-04 10:44:44 +08:00
parent 8e99c3f339
commit f317fb4c0c
1 changed files with 19 additions and 7 deletions

View File

@ -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 }
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++;