diff --git a/autoload/go/impl.vim b/autoload/go/impl.vim index 57c81c4de5..2a10437f10 100644 --- a/autoload/go/impl.vim +++ b/autoload/go/impl.vim @@ -40,7 +40,8 @@ function! go#impl#Impl(...) abort endif try - let result = go#util#System(join(go#util#Shelllist([binpath, recv, iface], ' '))) + let dirname = fnameescape(expand('%:p:h')) + let result = go#util#System(join(go#util#Shelllist([binpath, '-dir', dirname, recv, iface], ' '))) let result = substitute(result, "\n*$", "", "") if go#util#ShellError() != 0 call go#util#EchoError(result)