Merge pull request #118168 from KoBeWi/fif.inc

Handle gdshaderinc files in Find in Files
This commit is contained in:
Thaddeus Crews
2026-04-08 09:25:37 -05:00
+2 -2
View File
@@ -3672,7 +3672,7 @@ void ScriptEditor::_on_find_in_files_result_selected(const String &fpath, int li
if (ResourceLoader::exists(fpath)) {
Ref<Resource> res = ResourceLoader::load(fpath);
if (fpath.get_extension() == "gdshader") {
if (fpath.has_extension("gdshader") || fpath.has_extension("gdshaderinc")) {
ShaderEditorPlugin *shader_editor = Object::cast_to<ShaderEditorPlugin>(EditorNode::get_editor_data().get_editor_by_name("Shader"));
shader_editor->edit(res.ptr());
shader_editor->make_visible(true);
@@ -3681,7 +3681,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;