From d909e2e4118874ceb9b025e33acd518c79390407 Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Wed, 18 May 2016 23:20:05 +0300 Subject: [PATCH 1/2] lint: escape directory for shell invocation Fixes #857 --- autoload/go/lint.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/go/lint.vim b/autoload/go/lint.vim index 236abb733f..34ff7f6f58 100644 --- a/autoload/go/lint.vim +++ b/autoload/go/lint.vim @@ -24,7 +24,7 @@ endif function! go#lint#Gometa(autosave, ...) abort if a:0 == 0 - let goargs = expand('%:p:h') + let goargs = shellescape(expand('%:p:h')) else let goargs = go#util#Shelljoin(a:000) endif From eb19cc5201db8118277fa1ae4a0730e76fee6a0a Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Sun, 22 May 2016 01:24:06 +0300 Subject: [PATCH 2/2] textobj: escape files for motion as well --- autoload/go/textobj.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/go/textobj.vim b/autoload/go/textobj.vim index 1901d061a2..ba1d03eee1 100644 --- a/autoload/go/textobj.vim +++ b/autoload/go/textobj.vim @@ -16,7 +16,7 @@ endif function! go#textobj#Function(mode) let offset = go#util#OffsetCursor() - let fname = expand("%:p") + let fname = shellescape(expand("%:p")) if &modified " Write current unsaved buffer to a temp file and use the modified content let l:tmpname = tempname() @@ -103,7 +103,7 @@ function! go#textobj#FunctionJump(mode, direction) let offset = go#util#OffsetCursor() - let fname = expand("%:p") + let fname = shellescape(expand("%:p")) if &modified " Write current unsaved buffer to a temp file and use the modified content let l:tmpname = tempname()