You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When configuring a custom word separator (as implemented in #92514) it is not possible anymore to lookup a symbol containing this separator (only applies to code lookup via context menu, since for some reason calculating words for lookup isn't consistent, maybe this should be the job of the ScriptLanguage and not the CodeEdit 🤔).
You can even end up on in wrong places if the part after the separator matches another lookup target.
var my_print
my_print # looking up over print will bring you to the print docs if _ is configured as separator
Steps to reproduce
configure a custom separator in the editor settings
name a variable containing this separator
spell it out
try to look it up
Minimal reproduction project (MRP)
Only contains a script where you can observe it, the editor settings need to be tweeked manually.
I can confirm this. Ctrl + click points to the correct definition, but right clicking on "print" brings the print documentation. Any ideas how can I fix this?
The not easy, but probably better from a design standpoint, solution:
Rework the whole system, so that word separation for symbol lookup is handled by the ScriptLanguage (or let the script language provide a set of separators).
The quick and dirty fix:
the context menu entry uses get_word_under_caret
the ctrl + click combination uses TextEdit::get_word_at_pos
one works the other not, so just change the not working one to the working one
TextEdit::get_word_at_pos not respecting custom word separators might be a bug on its own though. Not sure 🤷
Or maybe the custom separator usage could be turned of while using the context menu, but that sounds a bit hacky to me.
Tested versions
v4.3.beta3.official [82cedc8]
System information
Godot v4.3.beta3 - Fedora Linux 40 (Workstation Edition) - Wayland - Vulkan (Forward+)
Issue description
When configuring a custom word separator (as implemented in #92514) it is not possible anymore to lookup a symbol containing this separator (only applies to code lookup via context menu, since for some reason calculating words for lookup isn't consistent, maybe this should be the job of the
ScriptLanguage
and not theCodeEdit
🤔).You can even end up on in wrong places if the part after the separator matches another lookup target.
Steps to reproduce
Minimal reproduction project (MRP)
Only contains a script where you can observe it, the editor settings need to be tweeked manually.
lookup.zip
The text was updated successfully, but these errors were encountered: