Skip to content

Commit

Permalink
fix /issues/3690: set noshellslash only on win32
Browse files Browse the repository at this point in the history
In neovim nightly, neovim/neovim/pull/28400 was merged:

> The value of shellslash should show true now outside of Windows.
> set shellslash should work on POSIX while set noshellslash will fail

This PR for vim-go wraps `set noshellslash` between a `if has("win32")`
conditional to ensure that the functions no longer error in POSIX
environments.

Signed-off-by: Stanley Chan <[email protected]>
  • Loading branch information
happy-dude committed Nov 11, 2024
1 parent ac1fb96 commit 9ebbe1e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions autoload/go/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ function! go#util#Shelljoin(arglist, ...) abort
endif

let ssl_save = &shellslash
set noshellslash
if has("win32")
set noshellslash
endif
if a:0
return join(map(copy(a:arglist), 'shellescape(v:val, ' . a:1 . ')'), ' ')
endif
Expand All @@ -332,7 +334,9 @@ endfunction
function! go#util#Shelllist(arglist, ...) abort
try
let ssl_save = &shellslash
set noshellslash
if has("win32")
set noshellslash
endif
if a:0
return map(copy(a:arglist), 'go#util#Shelljoin(v:val, ' . a:1 . ')')
endif
Expand Down Expand Up @@ -779,7 +783,7 @@ function! go#util#TestNamesInFile() abort
call cursor(l:line-1, 1)
let l:line = go#util#testLine()
endwhile

call setpos('.', l:startpos)

let l:tests = []
Expand Down

0 comments on commit 9ebbe1e

Please sign in to comment.