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

"Add argument name" requires you to be on exactly the argument #19175

Closed
davkean opened this issue May 2, 2017 · 2 comments
Closed

"Add argument name" requires you to be on exactly the argument #19175

davkean opened this issue May 2, 2017 · 2 comments
Assignees
Labels
Area-IDE Bug Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@davkean
Copy link
Member

davkean commented May 2, 2017

  1. CTRL+. at $
using System;

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine(args$);        
    }
}

Expected: To be offered to "Add argument name"
Actual: Not offered to "Add argument name"

Note, for highlighting usage and goto definition purposes that character position is considered part of the argument.

@Pilchie Pilchie added this to the 15.later milestone May 3, 2017
@Pilchie
Copy link
Member

Pilchie commented May 3, 2017

@alrz want to take a look? @CyrusNajmabadi do you know if we have better for refactorings to use here?

@CyrusNajmabadi
Copy link
Member

We have a helper called "GetTouchingWordAsync" which may be helpful here. But, since the last token may not be a keyword/idntifier, we probably just need to check if the current token is ) or ,, and we're at the start of it, then just move back one token.

@sharwell sharwell added the Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented label May 17, 2017
@sharwell sharwell modified the milestones: 15.3, 15.later May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

4 participants