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

textDocument/definition finds the last variable declaration instead of the earliest one #141

Closed
rcjsuen opened this issue Aug 7, 2017 · 2 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Aug 7, 2017

FROM node
ARG var=value
ARG var=value2
RUN echo $var
RUN echo $var

If you select the $var on the two RUN lines and invoke the textDocument/definition request, it will jump to the second ARG line. It should jump to the first ARG line instead.

@rcjsuen rcjsuen added the bug label Aug 7, 2017
@rcjsuen rcjsuen self-assigned this Aug 7, 2017
@rcjsuen rcjsuen changed the title textDocument/definition finds most recent variable declaration instead of the earliest one textDocument/definition finds most the last variable declaration instead of the earliest one Aug 7, 2017
@rcjsuen
Copy link
Owner Author

rcjsuen commented Aug 7, 2017

Actually, looks like it finds the last one instead. The textDocument/definition request returns the second ARG instruction at the bottom instead of the first.

FROM node
ARG var
RUN echo $var
ARG var

@rcjsuen rcjsuen changed the title textDocument/definition finds most the last variable declaration instead of the earliest one textDocument/definition finds the last variable declaration instead of the earliest one Aug 7, 2017
@rcjsuen
Copy link
Owner Author

rcjsuen commented Aug 7, 2017

Fixed by 98601e9. The commit message is wrong and it fixes this issue, not #140.

@rcjsuen rcjsuen closed this as completed Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant