From 14a1695f844a320dd28a7706710325773d1046a8 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 12 Jul 2017 13:02:58 -0400 Subject: [PATCH] Fix repeated background execution Closes https://github.com/tpope/vim-dispatch/issues/205 --- autoload/dispatch.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/dispatch.vim b/autoload/dispatch.vim index 9d3d05e..1d8755f 100644 --- a/autoload/dispatch.vim +++ b/autoload/dispatch.vim @@ -621,8 +621,10 @@ function! dispatch#compile_command(bang, args, count) abort call writefile([], request.file) - if s:dispatch(request) && !get(request, 'background') - call s:cgetfile(request) + if s:dispatch(request) + if !get(request, 'background') + call s:cgetfile(request) + endif else let request.handler = 'sync' let after = 'call DispatchComplete('.request.id.')'