Browse Source

+ use Video.ExtendedGraphemeClusterDisplayWidth to support double width characters in MoveStr and MoveCStr

git-svn-id: branches/unicodekvm@48770 -
nickysn 4 years ago
parent
commit
e539696f29
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/fv/src/drivers.inc

+ 2 - 2
packages/fv/src/drivers.inc

@@ -988,7 +988,7 @@ BEGIN
      begin
      begin
        If (Attr <> 0) Then P^.Attribute := Attr;        { Copy attribute }
        If (Attr <> 0) Then P^.Attribute := Attr;        { Copy attribute }
        P^.ExtendedGraphemeCluster := EGC;               { Copy string char }
        P^.ExtendedGraphemeCluster := EGC;               { Copy string char }
-       Inc(P);
+       Inc(P, Video.ExtendedGraphemeClusterDisplayWidth(EGC));
      end;
      end;
 END;
 END;
 {$else FV_UNICODE}
 {$else FV_UNICODE}
@@ -1019,7 +1019,7 @@ BEGIN
            If (Lo(Attrs) <> 0) Then
            If (Lo(Attrs) <> 0) Then
              P^.Attribute := Lo(Attrs);                   { Copy attribute }
              P^.Attribute := Lo(Attrs);                   { Copy attribute }
            P^.ExtendedGraphemeCluster:=EGC;               { Copy string char }
            P^.ExtendedGraphemeCluster:=EGC;               { Copy string char }
-           Inc(P);                                        { Next position }
+           Inc(P, Video.ExtendedGraphemeClusterDisplayWidth(EGC));  { Next position }
          end
          end
        else
        else
          begin
          begin