LCL carbon: fixed #0012061: TMemo does not delete lines - Carbon

- remove line end

git-svn-id: trunk@16497 -
This commit is contained in:
tombo 2008-09-09 08:16:43 +00:00
parent 72d5cfba41
commit 90a84d1a7a

View File

@ -1692,7 +1692,10 @@ var
AStart, AEnd: TXNOffset;
begin
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),
Self, 'DeleteLine', 'TXNSetData');