Skip to content

Commit 1212978

Browse files
committed
U906-019 Don't skip project reloading
if didChangeConfiguration provides a different charset.
1 parent 57e4ba0 commit 1212978

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

source/ada/lsp-ada_handlers.adb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3427,6 +3427,7 @@ package body LSP.Ada_Handlers is
34273427

34283428
-- Avoid project reloading if scenario/gpr are the same
34293429
if Self.Project_Tree = null
3430+
or else Self.Charset /= Charset
34303431
or else Self.Project_Tree.Root_Project.Project_Path /= GPR
34313432
or else Self.Scenario /= Variables
34323433
or else not Match (Self.Project_Environment.Build_Tree_Dir,
@@ -3609,8 +3610,9 @@ package body LSP.Ada_Handlers is
36093610
-- We're loading an actual project
36103611
Self.Project_Status := Status;
36113612

3612-
-- Store scenario variables
3613+
-- Store scenario variables and charset
36133614
Self.Scenario := Scenario;
3615+
Self.Charset := To_Unbounded_String (Charset);
36143616

36153617
-- Now load the new project
36163618
Errors.a_type := LSP.Messages.Warning;

source/ada/lsp-ada_handlers.ads

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
with Ada.Containers.Hashed_Maps;
2222
with Ada.Containers.Hashed_Sets;
23+
with Ada.Strings.Unbounded;
2324
with VSS.String_Vectors;
2425

2526
with GNATCOLL.VFS; use GNATCOLL.VFS;
@@ -276,6 +277,9 @@ private
276277
Scenario : LSP.Types.LSP_Any;
277278
-- Last used scenario variables
278279

280+
Charset : Ada.Strings.Unbounded.Unbounded_String;
281+
-- Character set from didChangeConfiguration
282+
279283
Project_Dirs_Loaded : File_Sets.Set;
280284
-- The directories to load in the "implicit project"
281285

0 commit comments

Comments
 (0)