File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -247,8 +247,12 @@ package body LSP.Ada_Handlers is
247247 -- Check if the given file belongs to the runtime.
248248
249249 function Is_A_Source (Self : LSP.Ada_Contexts.Context) return Boolean is
250- (Is_Runtime_File or else Self.Is_Part_Of_Project (File));
250+ ((Is_Runtime_File and then not Self.Is_Fallback_Context)
251+ or else Self.Is_Part_Of_Project (File));
251252 -- Return True if File is a source of the project held by Context
253+ -- Avoid considering runtime files as sources for the fallback context,
254+ -- if there is no context available for this file then we will still
255+ -- use the fallback later.
252256
253257 Contexts : constant LSP.Ada_Context_Sets.Context_Lists.List :=
254258 (Self.Contexts.Each_Context (Is_A_Source'Unrestricted_Access));
You can’t perform that action at this time.
0 commit comments