Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic-merge committed Oct 5, 2023
2 parents 02fef66 + 6150138 commit 829c371
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/ada/lsp-ada_driver.adb
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,21 @@ begin
Server.Run
(GPR_Handler'Unchecked_Access,
Tracer'Unchecked_Access,
In_Logger => In_Logger'Unchecked_Access,
Out_Logger => Out_Logger'Unchecked_Access);
In_Logger => (if In_Trace.Is_Active
then In_Logger'Unchecked_Access else null),
Out_Logger => (if Out_Trace.Is_Active
then Out_Logger'Unchecked_Access else null));

else
Register_Commands;

Server.Run
(Ada_Handler'Unchecked_Access,
Tracer'Unchecked_Access,
In_Logger => In_Logger'Unchecked_Access,
Out_Logger => Out_Logger'Unchecked_Access);
In_Logger => (if In_Trace.Is_Active
then In_Logger'Unchecked_Access else null),
Out_Logger => (if Out_Trace.Is_Active
then Out_Logger'Unchecked_Access else null));
end if;
exception
when E : others =>
Expand Down
1 change: 1 addition & 0 deletions source/ada/lsp-ada_handlers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,7 @@ package body LSP.Ada_Handlers is
-- been computed.
if Value.data.Is_Empty then
Self.Sender.On_Completion_Resolve_Response (Id, Value);
return;
end if;

C := Value.data.First;
Expand Down
7 changes: 7 additions & 0 deletions source/server/lsp-secure_message_loggers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ package body LSP.Secure_Message_Loggers is
Value : LSP.Structures.DidChangeTextDocumentParams)
is
use type Ada.Containers.Count_Type;
use type VSS.Strings.Character_Count;

Ok : Boolean := True;

Expand All @@ -289,6 +290,12 @@ package body LSP.Secure_Message_Loggers is
and then not Content.rangeLength.Is_Set
then
Self.Output.Put ("<some text>", Ok);
elsif (for some Change of Value.contentChanges =>
Change.text.Character_Length > 80)
or else Value.contentChanges.Last_Index > 20
then
-- Don't dump very long changes to avoid stack overflow
Self.Output.Put ("<some big change>", Ok);
else
Self.Output.Put
(VSS.Strings.To_Virtual_String
Expand Down

0 comments on commit 829c371

Please sign in to comment.