diff --git a/autoload/go/lsp.vim b/autoload/go/lsp.vim index aa8e787b3a..ef7ec4008a 100644 --- a/autoload/go/lsp.vim +++ b/autoload/go/lsp.vim @@ -619,7 +619,7 @@ function! s:definitionHandler(next, msg) abort dict let l:msguri = go#path#FromURI(l:msg.uri) " remove the comma in cygwin unix-like windwos path " e.g. '/c:/path' to '/c/path' - if system('uname') =~ 'MINGW' || system('uname') =~ 'CYGWIN' + if has('win32unix') && (system('uname') =~ 'MINGW' || system('uname') =~ 'CYGWIN') if l:msguri[2:3] is# ':/' let l:msguri = l:msguri[0:1] . l:msguri[3:] endif