Closing internal help (class reference) do not returns to original file
Tested versions
Reproducible in v4.4.1.stable.official [49a5bc7b6]
System information
Godot v4.4.1.stable - Windows 11 (build 26100) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 4060 Ti (NVIDIA; 32.0.15.7640) - Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz (16 threads)
Issue description
When editing multiple scripts, it is expected that when you close script file in script editor, previously opened file displayed. It is true for user scripts, but have an issue if trying to open Godot class reference: when closing this help, editor can return to the script, that is 1 position above in the list of scrips on panel. This is not a high priority issue but still somewhat annoying when opening class references frequently.
Steps to reproduce
- Open multiple scripts in script editor.
- Select non-first (not top) script in list.
- Ctrl-click on any Godot function to open class help reference.
- Close help window by shortcut or by right-click + "Close" in scripts list panel.
- Editor should open a script one line above the one you Ctrl-clicked for help from.
- If not reproduced - repeat from step 3 one more time. For me it is 100% reproducible on 2nd time, but rarely reproduced at 1st time.
Minimal reproduction project (MRP)
N/A
Video demonstration on YouTube Just thought, when closing class reference, it is possible it returns back twice, not just one script up in list. Not sure though.
Can reproduce on:
Godot v4.6.dev (25203e24c) - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 SUPER (NVIDIA; 32.0.15.8180) - AMD Ryzen 7 7800X3D 8-Core Processor (16 threads) - 63.11 GiB memory
I am not sure if it is the same behavior but it is definitely unwanted behavior. In my testing the returned to script is switching every time a reference is opened in a new file and the new file is then closed (it also happens when a script is opened this, like when jumping to a custom class definition). The following video shows demonstrates this (see how I have to manually open Node.gd every second time):
Edit: I tested this some more and the behaviour isn't very consistent sometimes it switches between more than two files and sometimes it behaves normally. It looks like sometimes the history is not updated correctly with the new tab so in the history the old tab is still active and when closing a tab the tab previous to the wrong current tab is opened
https://github.com/user-attachments/assets/abc73c31-a159-4e7f-b21f-c03b5840fe95