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