Open FMorschel opened 1 month ago
Summary: The issue is that when using CTRL + Click on an alias defined multiple times in different imports, the IDE incorrectly navigates to the first import instead of the correct one or providing a peek window to choose between them. This behavior is problematic when multiple imports exist between the relevant ones, making it difficult to locate the correct source.
As a reference, this came from a talk about https://github.com/dart-lang/sdk/issues/32735
Repro:
a.dart
b.dart
withclass Foo {}
inside.main.dart
with the following content:Even though
Foo
comes fromb.dart
when you CTRL + Clicklib.
before it, it moves the cursor for line 1 (import 'a.dart' as lib;
).I'd expect it to show the second line (for
b.dart
) or if both imports have that element for it to show a peek window to see all imports and select which you want (or default to this if there is nothing after the prefix).This is a bad behaviour specially when there are multiple imports between the two (or more) that have the alias and you can't see them.
CC: @DanTup