BowlerHatLLC / vscode-as3mxml

ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
https://as3mxml.com/
Apache License 2.0
257 stars 39 forks source link

Space after comma causes signature help to disappear #667

Closed ylazy closed 1 year ago

ylazy commented 1 year ago

Please view the clip to see the issue:

https://user-images.githubusercontent.com/6010183/212954634-efbb8cc4-aa46-462b-91ea-f89770bc47f0.mp4

I'm using the latest version (1.15.0)

Thanks!

joshtynjala commented 1 year ago

Can you describe exactly what breaks, and what you think it should do instead? I'm not sure that I actually understand from the video alone.

ylazy commented 1 year ago

When I typed , (comma), the code completion showed the parameters (str, search, replace, ignoreCase...) of the function replaceAll and highlighted the current param (ignoreCase). Then I typed (space), and the code completion for the params has gone. It should continue to display.

joshtynjala commented 1 year ago

I've determined that this is a bug in the Royale AS3 compiler, which is used for code intelligence in vscode-as3mxml. The ending offset of an IFunctionCallNode is not properly set to the position of the ) character, in some cases, so the signature help provider in vscode-as3mxml is failing to detect that it is still within a function call.

joshtynjala commented 1 year ago

Fixed in apache/royale-compiler@dcc026bf8b961f67035f74f2b18a7a9830687ac0. vscode-as3mxml needs to wait until the next Apache Royale release to include this fix, though.