From bd3f550c140599d3ab6819f4d23aa89565ace40c Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 3 Apr 2026 22:13:12 +0200 Subject: [PATCH] Handle gdshaderinc files in Find in Files --- editor/script/script_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/script/script_editor_plugin.cpp b/editor/script/script_editor_plugin.cpp index 65f2c6d2ca..f46bf52fcf 100644 --- a/editor/script/script_editor_plugin.cpp +++ b/editor/script/script_editor_plugin.cpp @@ -3653,7 +3653,7 @@ void ScriptEditor::_on_find_in_files_result_selected(const String &fpath, int li if (ResourceLoader::exists(fpath)) { Ref res = ResourceLoader::load(fpath); - if (fpath.get_extension() == "gdshader") { + if (fpath.has_extension("gdshader") || fpath.has_extension("gdshaderinc")) { ShaderEditorPlugin *shader_editor = Object::cast_to(EditorNode::get_editor_data().get_editor_by_name("Shader")); shader_editor->edit(res.ptr()); shader_editor->make_visible(true); @@ -3662,7 +3662,7 @@ void ScriptEditor::_on_find_in_files_result_selected(const String &fpath, int li text_shader_editor->goto_line_selection(line_number - 1, begin, end); } return; - } else if (fpath.get_extension() == "tscn") { + } else if (fpath.has_extension("tscn")) { const PackedStringArray lines = FileAccess::get_file_as_string(fpath).split("\n"); if (line_number > lines.size()) { return;