mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 13:32:31 +02:00
IDE: Initialize return value for "Enclose in $IFDEF". Issue #24713, patch from Joachim Förster.
git-svn-id: trunk@42130 -
This commit is contained in:
parent
82cc90a009
commit
4aecd50e0f
@ -208,8 +208,7 @@ begin
|
|||||||
DeleteSelected;
|
DeleteSelected;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCondForm.ListBoxKeyDown(Sender: TObject; var Key: Word;
|
procedure TCondForm.ListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
Shift: TShiftState);
|
|
||||||
begin
|
begin
|
||||||
if Key = VK_DELETE then begin
|
if Key = VK_DELETE then begin
|
||||||
DeleteSelected;
|
DeleteSelected;
|
||||||
@ -279,8 +278,10 @@ var
|
|||||||
p, p1: Integer;
|
p, p1: Integer;
|
||||||
IsElse, IsTwo, HasNewline: Boolean;
|
IsElse, IsTwo, HasNewline: Boolean;
|
||||||
Tail, Indent: string;
|
Tail, Indent: string;
|
||||||
|
|
||||||
function ifdef(s:string):string;
|
function ifdef(s:string):string;
|
||||||
begin
|
begin
|
||||||
|
Result :='';
|
||||||
if (s <>'') and (s[1] = '!') then begin
|
if (s <>'') and (s[1] = '!') then begin
|
||||||
if IsPascal then
|
if IsPascal then
|
||||||
Result := 'N'
|
Result := 'N'
|
||||||
@ -293,6 +294,7 @@ var
|
|||||||
else
|
else
|
||||||
Result := '#if' + Result + 'def ' + s;
|
Result := '#if' + Result + 'def ' + s;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := Text;
|
Result := Text;
|
||||||
cond := ShowConDefDlg;
|
cond := ShowConDefDlg;
|
||||||
|
Loading…
Reference in New Issue
Block a user