mirror of
				https://github.com/MaskRay/ccls.git
				synced 2025-11-04 14:17:07 +00:00 
			
		
		
		
	Fix preload completion session.
This commit is contained in:
		
							parent
							
								
									8b4a8d2d48
								
							
						
					
					
						commit
						c54919a3a4
					
				@ -368,8 +368,7 @@ void TryEnsureDocumentParsed(ClangCompleteManager *manager,
 | 
			
		||||
  WorkingFiles::Snapshot snapshot = session->working_files->AsSnapshot(
 | 
			
		||||
      {StripFileType(session->file.filename)});
 | 
			
		||||
 | 
			
		||||
  LOG_S(INFO) << "Creating completion session with arguments "
 | 
			
		||||
              << StringJoin(args, " ");
 | 
			
		||||
  LOG_S(INFO) << "Creating completion session for " << session->file.filename;
 | 
			
		||||
  *tu = ClangTranslationUnit::Create(session->file.filename, args, snapshot,
 | 
			
		||||
                                     diagnostic);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -50,9 +50,6 @@ struct Handler_TextDocumentDidOpen
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    include_complete->AddFile(working_file->filename);
 | 
			
		||||
    clang_complete->NotifyView(path);
 | 
			
		||||
    if (g_config->diagnostics.onParse)
 | 
			
		||||
      clang_complete->DiagnosticsUpdate({params.textDocument.uri});
 | 
			
		||||
    if (params.args.size())
 | 
			
		||||
      project->SetFlagsForFile(params.args, path);
 | 
			
		||||
 | 
			
		||||
@ -64,6 +61,10 @@ struct Handler_TextDocumentDidOpen
 | 
			
		||||
 | 
			
		||||
      clang_complete->FlushSession(entry.filename);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    clang_complete->NotifyView(path);
 | 
			
		||||
    if (g_config->diagnostics.onParse)
 | 
			
		||||
      clang_complete->DiagnosticsUpdate({params.textDocument.uri});
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
REGISTER_MESSAGE_HANDLER(Handler_TextDocumentDidOpen);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user