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

Fix :GoImpl completion #1581

Merged
merged 1 commit into from
Nov 25, 2017
Merged

Fix :GoImpl completion #1581

merged 1 commit into from
Nov 25, 2017

Conversation

arp242
Copy link
Contributor

@arp242 arp242 commented Nov 24, 2017

Fixes #1554

The problem is that :GoImpl somethingInvalid would set
v:shell_error, and on the next :GoImpl <Tab> the go#util#env()
call in s:root_dirs() would use the cache, so the v:shell_error is
"stuck".

Fix it by not checking this here; go#util#env() already shows an error
so that should be fine.

Long-term fix is to use go#util#Exec() everywhere which returns
v:shell_error instead of relying on a global value.

While I'm here also add a basic test and use Exec() in a few places.

Fixes #1554

The problem is that `:GoImpl somethingInvalid` would set
`v:shell_error`, and on the next `:GoImpl <Tab>` the `go#util#env()`
call in `s:root_dirs()` would use the cache, so the `v:shell_error` is
"stuck".

Fix it by not checking this here; `go#util#env()` already shows an error
so that should be fine.

Long-term fix is to use `go#util#Exec()` everywhere which returns
`v:shell_error` instead of relying on a global value.

While I'm here also add a basic test and use `Exec()` in a few places.
@bhcleek
Copy link
Collaborator

bhcleek commented Nov 24, 2017

LGTM

@arp242 arp242 merged commit c191a67 into fatih:master Nov 25, 2017
@arp242 arp242 deleted the impl-compl branch November 25, 2017 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

:GoImpl completion seems to break after an error
2 participants