Open Okxa opened 6 months ago
You can go back in history when editor jumps, it works both for doc pages and within the same script. It can be used with either the arrow buttons at the top or Back mouse button (if you have extra buttons).
You can go back in history when editor jumps, it works both for doc pages and within the same script.
That seems to leave the doc file open in the script editor list, requiring even more clicks to close it.
Describe the project you are working on
Any project when using inbuilt script editor.
Describe the problem or limitation you are having in your project
In Script Editor pressing CTRL + Left Mouse Button causes editor to lookup the symbol underneath cursor. This can be accidentally triggered and then the editor jumps around or opens the documentation for the symbol.
This interrups my work, as I now have to scroll back down to the location I was at, or close the opened documentation.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a editor setting which controls if the symbol lookup with CTRL+LMB is enabled.
Symbol Lookup can be still triggered from context menu.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Script Editor has CodeEdit.symbol_lookup_on_click always set to true.
This value should be read from project settings.
https://github.com/godotengine/godot/blob/fe01776f05b1787b28b4a270d53037a3c25f4ca2/editor/plugins/script_text_editor.cpp#L2372
The property being true makes CTRL+LMB trigger the lookup symbol:
https://github.com/godotengine/godot/blob/fe01776f05b1787b28b4a270d53037a3c25f4ca2/scene/gui/code_edit.cpp#L359-L396
Also note that the modifier is hardcoded (to command/control). Ideally this could be changed, but the text editor also has other hardcoded modifier keys (eg. multi-cursor selection being bound to ALT), so for this issues my proposed solution would be enough.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
Editor Enchantment.