From 54c13ffc87ee03391242f55fbc21ac1f2fb537b3 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Tue, 13 Jun 2017 08:47:20 -0400 Subject: [PATCH] Force stop an async run job when it closes --- vimrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index a5807b3..da18935 100644 --- a/vimrc +++ b/vimrc @@ -256,8 +256,13 @@ function! ToggleAsyncRunWindow() call asyncrun#quickfix_toggle(8) endfunction +function! StopTaskAndToggleWindow() + AsyncStop + call ToggleAsyncRunWindow() +endfunction + function! ExecuteRunScript() - exec "AsyncRun! -post=call\\ ToggleAsyncRunWindow() ./run" + exec "AsyncRun! -post=call\\ StopTaskAndToggleWindow() ./run" endfunction " Show results window the moment the async job starts