mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	Fix LSP completion crashing on sceneless scripts
This commit is contained in:
		
							parent
							
								
									8db0bd4424
								
							
						
					
					
						commit
						6db17a523e
					
				
					 2 changed files with 22 additions and 16 deletions
				
			
		|  | @ -425,9 +425,13 @@ void GDScriptTextDocument::sync_script_content(const String &p_path, const Strin | |||
| 	GDScriptLanguageProtocol::get_singleton()->get_workspace()->parse_script(path, p_content); | ||||
| 
 | ||||
| 	EditorFileSystem::get_singleton()->update_file(path); | ||||
| 	Ref<GDScript> script = ResourceLoader::load(path); | ||||
| 	script->load_source_code(path); | ||||
| 	script->reload(true); | ||||
| 	Error error; | ||||
| 	Ref<GDScript> script = ResourceLoader::load(path, "", false, &error); | ||||
| 	if (error == OK) { | ||||
| 		if (script->load_source_code(path) == OK) { | ||||
| 			script->reload(true); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| void GDScriptTextDocument::show_native_symbol_in_editor(const String &p_symbol_id) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Francois Belair
						Francois Belair