mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 02:19:10 +02:00
Cocoa: Fix #40937 the linefeed issue in TCocoaMemoStrings (patch by David Jenkins)
This commit is contained in:
parent
a3cc94cfff
commit
cf53186c8e
@ -203,6 +203,7 @@ type
|
||||
function Get(Index: Integer): string; override;
|
||||
public
|
||||
constructor Create(ATextView: TCocoaTextView);
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
procedure Clear; override;
|
||||
procedure Delete(Index: Integer); override;
|
||||
procedure Insert(Index: Integer; const S: string); override;
|
||||
@ -1433,6 +1434,16 @@ begin
|
||||
SetTextStr('');
|
||||
end;
|
||||
|
||||
procedure TCocoaMemoStrings.Assign(Source: TPersistent);
|
||||
begin
|
||||
if (Source=Self) or (Source=nil) then
|
||||
exit;
|
||||
if Source is TStrings then
|
||||
SetTextStr(TStrings(Source).Text)
|
||||
else
|
||||
inherited Assign(Source);
|
||||
end;
|
||||
|
||||
procedure TCocoaMemoStrings.Delete(Index:Integer);
|
||||
var
|
||||
s : AnsiString;
|
||||
|
Loading…
Reference in New Issue
Block a user