Skip to content

Commit b6f9c77

Browse files
committed
cmd: fix calling false paths
1 parent 5707cd4 commit b6f9c77

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

autoload/go/cmd.vim

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ function! go#cmd#Build(bang, ...)
3535

3636
cwindow
3737
let errors = getqflist()
38-
if !empty(errors) && !a:bang
39-
cc 1 "jump to first error if there is any
38+
if !empty(errors)
39+
if !a:bang
40+
cc 1 "jump to first error if there is any
41+
endif
4042
else
4143
redraws! | echon "vim-go: " | echohl Function | echon "[build] SUCCESS"| echohl None
4244
endif
@@ -232,8 +234,10 @@ function! go#cmd#Vet(bang)
232234
endif
233235

234236
let errors = getqflist()
235-
if !empty(errors) && !a:bang
236-
cc 1 "jump to first error if there is any
237+
if !empty(errors)
238+
if !a:bang
239+
cc 1 "jump to first error if there is any
240+
endif
237241
else
238242
redraw | echon "vim-go: " | echohl Function | echon "[vet] PASS" | echohl None
239243
endif

0 commit comments

Comments
 (0)