Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Method signature highlighting incorrect parameter when commas inside string #1682

Closed
cassiobock opened this issue May 18, 2018 · 6 comments
Closed

Comments

@cassiobock
Copy link

When I type commas inside a string parameter, the current highlighted parameter changes. I tested using a JS file and it didn't happened. Disabling all extensions except this one didn't fixed the issue as well.

Sample code

strings.Replace(",,,")

Image
image

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 22, 2018

Nice catch!

We use commas to determine how many of the parameters are already typed in. Looks like we end up counting commas even when they are inside a string.

PRs are welcome to fix this bug.

The fix should go here: https://github.com/Microsoft/vscode-go/blob/0.6.80/src/goSignature.ts#L92
To get started, see https://github.com/Microsoft/vscode-go/wiki/Building,-Debugging-and-Sideloading-the-extension-in-Visual-Studio-Code

@ramya-rao-a ramya-rao-a changed the title Method signature highlighting incorrect parameter Method signature highlighting incorrect parameter when commas inside string May 22, 2018
@cassiobock
Copy link
Author

Hi @ramya-rao-a,

Thanks for the heads up. I will definitely take a look later today.

@lggomez
Copy link
Contributor

lggomez commented May 29, 2018

@cassiobock are you still working on this or I am free to take a look at it?

@cassiobock
Copy link
Author

Hey @lggomez, feel free to take a look.

@ramya-rao-a
Copy link
Contributor

The latest beta version (0.9.3-beta.2) of this extension has the fix for this issue

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 7, 2019
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Apr 23, 2019

The fix for this issue is out in the latest release(0.10.0) of the Go extension

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants