Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to Definition (Ctrl + Click) on Include's Function Opens Incorrect Include #205

Open
megamorphg opened this issue Aug 15, 2022 · 0 comments
Assignees
Labels
AHK v1 exclusive to AHK v1 bug something isn't working

Comments

@megamorphg
Copy link

Description

Go to definition goes to incorrect #Include.

If you download the UIAutomation for example twice:
and then put it in two different directories:
!GitHub and Lib

and try to include the file and then use "Go to Definition", it will just jump to the first include that was opened, regardless of the include.

AHK Files
AHK File 1: !GitHub > UIAutomation > Examples > Example1_Notepad.ahk
AHK File 2: Lib > UIAutomation > Examples > Example1_Notepad.ahk

Includes Directory Tree:
Include in AHK File 1: !GitHub > UIAutomation > Lib > UIA_Interface.ahk
Include in AHK File 2: Lib > UIAutomation > Lib > UIA_Interface.ahk

Reproduction steps

Steps to reproduce the behavior:

  1. Have a library (e.g. UIA_Interface) in two different folder locations and add the parent folders to workspace.
  2. #Include the library in folder1 in AHK file 1
  3. #Include the library in folder2 in AHK file 2
  4. Go to definition of a function in folder 1 and folder 2 and observe it goes to the same definition instead of the definition of the correct #include

Expected behavior

Go to definition will go to the definition of the correct #Include that the class is using (just as when running the script would).

Additional context

I originally created this issue for the AHKv2 VS Code extension but I found that this is occurring only with this extension for AHKv1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AHK v1 exclusive to AHK v1 bug something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants