From c21175d885872d2a4b87bbd26d2582b6fa83c56b Mon Sep 17 00:00:00 2001 From: BodeSpezial Date: Wed, 16 Feb 2022 17:13:45 +0100 Subject: [PATCH] Use literal newline in order to properly split the string --- autoload/go/tool.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/go/tool.vim b/autoload/go/tool.vim index d3dd5dee3b..d0c0a399ca 100644 --- a/autoload/go/tool.vim +++ b/autoload/go/tool.vim @@ -36,7 +36,7 @@ function! go#tool#Files(...) abort if go#util#IsWin() let combined .= '{{range $f := .' . sf . '}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}' else - let combined .= "{{range $f := ." . sf . "}}{{$.Dir}}/{{$f}}{{printf \"\\n\"}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}/{{$f}}{{printf \"\\n\"}}{{end}}" + let combined .= "{{range $f := ." . sf . "}}{{$.Dir}}/{{$f}}\n{{end}}{{range $f := .CgoFiles}}{{$.Dir}}/{{$f}}\n{{end}}" endif endfor @@ -59,7 +59,7 @@ function! go#tool#Imports() abort if go#util#IsWin() let format = '{{range $f := .Imports}}{{$f}}{{printf \"\n\"}}{{end}}' else - let format = "{{range $f := .Imports}}{{$f}}{{printf \"\\n\"}}{{end}}" + let format = "{{range $f := .Imports}}{{$f}}\n{{end}}" endif let [l:out, l:err] = go#util#ExecInDir(['go', 'list', '-tags', go#config#BuildTags(), '-f', l:format]) if l:err != 0