From f14d1709525913bff85a62b92d78007b0dc70ec2 Mon Sep 17 00:00:00 2001 From: rwxguo <10892928+rwxguo@users.noreply.github.com> Date: Mon, 25 Dec 2023 13:04:01 +0000 Subject: [PATCH] use cygstart instead of start for cygwin rather than msys2 and gitbash --- autoload/go/config.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/go/config.vim b/autoload/go/config.vim index 91f16ff32c..c642ce0f8d 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -100,8 +100,15 @@ function! go#config#SnippetEngine() abort endfunction function! go#config#PlayBrowserCommand() abort - if go#util#IsWin() || go#util#IsCygwin() + if go#util#IsWin() let go_play_browser_command = '!start rundll32 url.dll,FileProtocolHandler %URL%' + elseif go#util#IsCygwin() + " CYGWIN uses 'cygstart', whereas MSYS2 and GitBash uses 'start' + if system('uname') =~ 'CYGWIN' + let go_play_browser_command = '!cygstart rundll32 url.dll,FileProtoco lHandler %URL%' + else + let go_play_browser_command = '!start rundll32 url.dll,FileProtocolHa ndler %URL%' + endif elseif go#util#IsMac() let go_play_browser_command = 'open %URL%' elseif executable('xdg-open')