mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 23:23:49 +02:00
lcl: fix TEdit, TCombobox SelText setter
git-svn-id: trunk@16502 -
This commit is contained in:
parent
69af17812f
commit
b8949b9c21
@ -303,7 +303,7 @@ begin
|
||||
OldSelStart := SelStart;
|
||||
NewText := UTF8Copy(OldText, 1, OldSelStart) +
|
||||
Val +
|
||||
UTF8Copy(OldText, UTF8Length(OldText) - SelStart - SelLength, MaxInt);
|
||||
UTF8Copy(OldText, OldSelStart + SelLength + 1, MaxInt);
|
||||
Text := NewText;
|
||||
SelStart := OldSelStart;
|
||||
SelLength := UTF8Length(Val);
|
||||
|
@ -113,9 +113,9 @@ var
|
||||
begin
|
||||
OldPos := SelStart;
|
||||
OldText := Text;
|
||||
NewText := UTF8Copy(OldText, 1, SelStart) +
|
||||
NewText := UTF8Copy(OldText, 1, OldPos) +
|
||||
Val +
|
||||
UTF8Copy(OldText, UTF8Length(OldText) - SelStart - SelLength, MaxInt);
|
||||
UTF8Copy(OldText, OldPos + SelLength + 1, MaxInt);
|
||||
Text := NewText;
|
||||
SelStart := OldPos + UTF8Length(Val);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user