godotengine / godotengine/godot
`Find in Files`: Selecting `tscn` result located after `GDScript` resource opens it in script editor
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in: v4.7.1-stable, v4.8.dev (4e8c061c9) (master)
### System information
Godot v4.8.dev (4e8c061c9) - Windows 11 (build 26200) - Multi-window, 2 monitors - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce RTX 4080 SUPER (NVIDIA; 32.0.15.9186) - AMD Ryzen 7 7800X3D 8-Core Processor (16 threads) - 63.11 GiB memory - WASAPI (48000 Hz, Stereo/mono)
### Issue description
Selecting a `tscn` `Find in Files` result from a line stored after a `GDScript` resource (which does not belong to it) still opens the next `GDScript` stored above it in the script editor
### Steps to reproduce
- New project
- New `Node2D` scene
- Add a built-in `GDScript`
- Save the scene
- Add `tscn` to `text_editor/behavior/general/find_in_file_extensions`
- Open the scene in a external program to find lines that are after the `GDScript` `sub_resource` block
- Search for such a line and click on the result
- If not already open the next script above the selected line will be opened in the script editor
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
Reproduce the issue in Godot's Find in Files using a scene with a built-in GDScript and a search result after the GDScript resource block. Start by tracing what happens when that result is selected; done means the result opens the correct resource or editor location instead of the preceding script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100