"Go to Definition" results in duplicate tabs when target is in sketch created in previous IDE version #1054
Closed
3 tasks done
Labels
conclusion: resolved
Issue was resolved
criticality: high
Of high impact
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
The Arduino IDE's language server-based "Go to definition" feature reveals the definition of a code component. If that definition is in a file that is not already open in an editor tab, a tab must be added for that file. If the file is already open in a tab then that tab is simply selected and the cursor placed at the start of the definition.
🐛 If the sketch was created in an earlier version of the Arduino IDE, "Go to definition" for a definition within one of the open sketch editor tabs causes the creation of a confusing duplicate tab instead of simply using the existing tab.
To reproduce
foo();
🐛 A duplicate tab is created.
🐛 The cursor is only moved to the start of the function definition in the newly created tab, and that tab is not selected, so the user is not guided to the function definition in any meaningful way.
Expected behavior
Duplicate tabs are not created.
Arduino IDE version
2.0.0-rc7
Operating system
Windows
Operating system version
Windows 10
Additional context
Related:
Originally reported at https://forum.arduino.cc/t/ctrl-click-navigation/1000117/19
Issue checklist
The text was updated successfully, but these errors were encountered: