Repository: godotengine/godot (language: cpp)

Issue:
Ctrl + Clicking on a variable no-longer takes you to that variable, when said variable is within a Global Autoload- 4.4 dev7
### Tested versions


- Reproducible in: 4.4.dev7 
- Not reproducible in: 4.3.stable


### System information

Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - AMD Radeon RX 6650 XT (Advanced Micro Devices, Inc.; 32.0.12033.1030) - AMD Ryzen 5 5600G with Radeon Graphics (12 Threads)

### Issue description

CTRL + Clicking on a variable that's referenced from a global-autoload file, now takes you to the auto-generated help for that file, rather than taking to the referenced variable. As-though the global-autoload is now regarded as a class.

In 4.3.stable, you'd be taken straight to that variable;



### Steps to reproduce

Video: https://github.com/user-attachments/assets/15287001-780d-4c26-82f7-bd797eacb6ee

---

```gd
# ./globals/core.gd
extends Node;

var is_paused:bool;
```

```gd
# ./main.gd
extends Node;

func _ready() -> void:
	Core.is_paused = true;
```

Add the `./globals/core.gd` file as a Global Autoload, then CTRL + Click on the `is_paused` variable in `./main.gd`.


### Minimal reproduction project (MRP)

MRP: [44dev7.zip](https://github.com/user-attachments/files/18216768/44dev7.zip)



Discussion / hints:
The problem is that <kbd>Ctrl+LMB</kbd> is used not only to jump to the source code, but also to open the documentation for native symbols. In the case of custom symbols, there is both documentation and source code, which causes a conflict.

I think we should split the functionality into two combinations. Say, <kbd>Ctrl+LMB</kbd> and <kbd>Alt+LMB</kbd>. Or <kbd>Ctrl+LMB</kbd> and <kbd>Ctrl+RMB</kbd>.
I see this in other scenarios, too, not just autoload globals. 
It seems to get into a state where CTRL-click takes you to the help like it's a built in.
In larger project of mine it doesn't seem to happen right after starting Godot only after using it for a while. 

I can repro the MRP above the first time I open it. When I restart Godot and re-open, CTRL-click works. Need to remove .godot contents and restart for it to happen again. 

Possibly related: CTRL-clicking on any of my enum values does nothing.
E.g. enum like this:
```
class_name E extends Object

enum Team {
	None,
...
func test():
	var t = E.Team.None
```
and CTRL-clicking on the 'None' of E.Team.None does nothing. 
When changing `var t` to `var t2`, save and CTRL-click on None it now takes me to the doc page.

Tried 4.4dev6 and all of the above seems to work as expected.
Maybe related to the new hover doc changes in dev7?
When I revert https://github.com/godotengine/godot/pull/91060/commits/80d11500b556259ddb5b9d4548a0922a5ac1cc92  of https://github.com/godotengine/godot/pull/91060 it works as expected.
> The problem is that Ctrl+LMB is used not only to jump to the source code, but also to open the documentation for native symbols. In the case of custom symbols, there is both documentation and source code, which causes a conflict.
> 
> I think we should split the functionality into two combinations. Say, Ctrl+LMB and Alt+LMB. Or Ctrl+LMB and Ctrl+RMB.

same is for functions it takes you to documentation instead of source code

I guess you are right that it should be split
CTRL + LMB also takes me to the documentation instead of the definition outside of autoloads. I assume this is a bug with the newly added documentation tool tips which are awesome, though.

![Image](https://github.com/user-attachments/assets/db95e88b-a0ca-4a4c-9902-20b9e976b0ec)

Went to that frustration as well with the 4.4.dev7 (it changed for all scripts, not only the autoload scripts).

Before hand, I was used to Ctrl+LMB to jump to the variables/functions declarations, now it opens documentation, even if I didn't create one (auto-generated documentation I guess)!

I vote for **customization of the shortcuts** as well, as I want to be able to jump to declaration using Ctrl+LMB and I only want to jump to documentation using something else, like Ctrl+Alt+LMB for example. In general, I want to be able to define all the shortcuts as I want them to be...

Fix patch:
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 94e3c8ba7b0f..370c399786c9 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -968,7 +968,7 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c
 	} else if (lc_error == OK) {
 		_goto_line(p_row);
 
-		if (!result.class_name.is_empty() && EditorHelp::get_doc_data()->class_list.has(result.class_name)) {
+		if (!result.class_name.is_empty() && EditorHelp::get_doc_data()->class_list.has(result.class_name) && !EditorHelp::get_doc_data()->class_list[result.class_name].is_script_doc) {
 			switch (result.type) {
 				case ScriptLanguage::LOOKUP_RESULT_CLASS: {
 					emit_signal(SNAME("go_to_help"), "class_name:" + result.class_name);


Test patch: