Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve searching in built-in scripts #6032

Closed
KoBeWi opened this issue Jan 1, 2023 · 1 comment
Closed

Improve searching in built-in scripts #6032

KoBeWi opened this issue Jan 1, 2023 · 1 comment

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Jan 1, 2023

Describe the project you are working on

Big project with many built-in scripts.

Describe the problem or limitation you are having in your project

Built-in scripts (i.e. scripts embedded inside a scene), as much as I like them, they have one rather significant issue - when you try to search for something in all scripts, sometimes it's difficult to know which script the result belongs to.
Example:
image
I searched for something and got results in different scenes. However when I click the result, instead of opening the script and pointing me to the particular line, only the scene is opened. Many of my scenes have multiple embedded scripts, so finding the relevant script can be a hassle. #4567 would help a bit, but it could be handled better.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

When using "Find in Files" and there are results in built-in scripts, clicking the result should open that script, instead of only the scene.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

One solution I have in mind is to keep track of script's line range within a scene. I.e. for each built-in script, while the scene is being loaded, the script could remember the starting line and ending line inside the TSCN file. When clicking a built-in script search result, the scene line would be translated to a specific script contained within that range.

This information would be stored only in editor builds.

If this enhancement will not be used often, can it be worked around with a few lines of script?

The best workaround right now is to use external editor for searching, but it's inconvenient if you use the built-in script editor normally.

Is there a reason why this should be core and not an add-on in the asset library?

It's about editor usability.

@KoBeWi
Copy link
Member Author

KoBeWi commented Apr 2, 2023

Closed by godotengine/godot#74401

@KoBeWi KoBeWi closed this as completed Apr 2, 2023
@KoBeWi KoBeWi added this to the 4.1 milestone Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants