Skip to content

Commit 894fa6c

Browse files
BoulangerAdrienBoulanger
authored andcommitted
Unwanted reload for configuration changed
The scenario variables should only be compared to the current one when they are explicitly changed. eng/ide/ada_language_server#1236
1 parent a4d444c commit 894fa6c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

source/ada/lsp-ada_configurations.adb

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@ package body LSP.Ada_Configurations is
205205
and then JSON (Index).Kind = Start_Object
206206
then
207207
Parse_Variables (Index);
208+
Sort_Variables (1, Variables_Names.Length);
209+
210+
Reload := Reload or else
211+
Variables_Names /= Self.Variables_Names or else
212+
Variables_Values /= Self.Variables_Values;
213+
214+
Self.Variables_Names := Variables_Names;
215+
Self.Variables_Values := Variables_Values;
208216

209217
elsif Name = "defaultCharset"
210218
and then JSON (Index).Kind = String_Value
@@ -288,15 +296,6 @@ package body LSP.Ada_Configurations is
288296

289297
Skip_Value (JSON, Index);
290298
end loop;
291-
292-
Sort_Variables (1, Variables_Names.Length);
293-
294-
Reload := Reload or else
295-
Variables_Names /= Self.Variables_Names or else
296-
Variables_Values /= Self.Variables_Values;
297-
298-
Self.Variables_Names := Variables_Names;
299-
Self.Variables_Values := Variables_Values;
300299
end Parse_Ada;
301300

302301
--------------------

0 commit comments

Comments
 (0)