mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 21:10:42 +02:00
lcl: don't add lineending after the last line in TListBox.GetSelectedText (bug #0012839)
git-svn-id: trunk@18097 -
This commit is contained in:
parent
342531bc74
commit
93a355923e
@ -670,10 +670,15 @@ function TCustomListBox.GetSelectedText: string;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result:='';
|
||||
if ItemIndex<0 then exit;
|
||||
for i:=0 to Items.Count-1 do
|
||||
if Selected[i] then Result:=Result+Items[i]+LineEnding;
|
||||
Result := '';
|
||||
if ItemIndex < 0 then
|
||||
Exit;
|
||||
for i := 0 to Items.Count - 1 do
|
||||
if Selected[i] then
|
||||
if Result = '' then
|
||||
Result := Items[i]
|
||||
else
|
||||
Result := Result + LineEnding + Items[i]
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user