Explorar o código

fix multichar count

Unknown %!s(int64=6) %!d(string=hai) anos
pai
achega
8fd3105f50
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      lazpaintcontrols/lcvectortextshapes.pas

+ 2 - 2
lazpaintcontrols/lcvectortextshapes.pas

@@ -294,7 +294,7 @@ begin
   begin
     delCount := GetTextLayoutIgnoreMatrix.DeleteTextBefore(selLeft, ACount);
     FText := GetTextLayoutIgnoreMatrix.TextUTF8;
-    dec(selLeft,ACount);
+    dec(selLeft,delCount);
   end;
   FSelStart := selLeft;
   FSelEnd := selLeft;
@@ -311,7 +311,7 @@ begin
   begin
     delCount := GetTextLayoutIgnoreMatrix.DeleteText(selRight, ACount);
     FText := GetTextLayoutIgnoreMatrix.TextUTF8;
-    inc(selRight,ACount);
+    inc(selRight,delCount);
   end;
   FSelStart := selRight;
   FSelEnd := selRight;