loganch / AutoIt-VSCode

AutoIt Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=Damien.autoit
MIT License
74 stars 25 forks source link

Problem due to F12/OpenInclude #87

Closed Danp2 closed 2 years ago

Danp2 commented 2 years ago

https://github.com/loganch/AutoIt-VSCode/commit/4e2bccede32ef9cc1f5aefc54a24ee0a01c8c576

The above commit by me is triggering unexpected opening of include files. This seems to occur when the cursor is located on a #include line, and provideDefinition is being trigger without F12 being pressed. I was unaware that this could occur, so an alternative implementation will be required for this.

Danp2 commented 2 years ago

I've found that holding the Control key down while the mouse pointer is over a line of code will trigger goToDefinitionFeature feature. I haven't yet determined if this is standard VSCode functionality or if it is coming from one of the installed extensions.

Danp2 commented 2 years ago

From here --

If you press Ctrl and hover over a symbol, a preview of the declaration will appear:

so this appears to be a standard feature.

@loganch I don't see a way to detect how the GoToDefinition function is being triggered (keystroke vs hover), so this change may need to be reverted to avoid the unexpected behavior.