Skip to content

Commit ab27cbb

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents 4c8888d + 2897960 commit ab27cbb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

source/ada/lsp-ada_execute_command.adb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,18 @@ package body LSP.Ada_Execute_Command is
8282
else Ada.Tags.Internal_Tag
8383
(VSS.Strings.Conversions.To_UTF_8_String (Params.command)));
8484

85-
Command : constant Command_Access :=
86-
(if Tag = Ada.Tags.No_Tag then null
87-
else new LSP.Ada_Commands.Command'Class'
88-
(Create_Command (Tag, Params.arguments'Unrestricted_Access)));
85+
function Command return Command_Access;
86+
-- Construct corresponding command for known Tag or return null
87+
88+
function Command return Command_Access is
89+
Result : Command_Access;
90+
begin
91+
if Tag /= Ada.Tags.No_Tag then
92+
Result := new LSP.Ada_Commands.Command'Class'
93+
(Create_Command (Tag, Params.arguments'Unrestricted_Access));
94+
end if;
95+
return Result;
96+
end Command;
8997

9098
Result : constant LSP.Server_Jobs.Server_Job_Access :=
9199
new Ada_Execute_Command_Job'

0 commit comments

Comments
 (0)