mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:59:06 +02:00
LCL carbon: fixed #0012061: TMemo does not delete lines - Carbon
- remove line end git-svn-id: trunk@16497 -
This commit is contained in:
parent
72d5cfba41
commit
90a84d1a7a
@ -1692,7 +1692,10 @@ var
|
|||||||
AStart, AEnd: TXNOffset;
|
AStart, AEnd: TXNOffset;
|
||||||
begin
|
begin
|
||||||
GetLineOffset(AIndex, AStart, AEnd);
|
GetLineOffset(AIndex, AStart, AEnd);
|
||||||
if (AIndex > 0) and (AIndex = GetLineCount - 1) then Dec(AStart);
|
// remove line end
|
||||||
|
if (AIndex = 0) and (GetLineCount > 1) then Inc(AEnd)
|
||||||
|
else
|
||||||
|
if AIndex > 0 then Dec(AStart);
|
||||||
|
|
||||||
OSError(TXNSetData(HITextViewGetTXNObject(ControlRef(Widget)), kTXNUnicodeTextData, nil, 0, AStart, AEnd),
|
OSError(TXNSetData(HITextViewGetTXNObject(ControlRef(Widget)), kTXNUnicodeTextData, nil, 0, AStart, AEnd),
|
||||||
Self, 'DeleteLine', 'TXNSetData');
|
Self, 'DeleteLine', 'TXNSetData');
|
||||||
|
Loading…
Reference in New Issue
Block a user