From 5de0208d3e0fa9a62a4a833c9c24ab1b7a11f5fe Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Thu, 13 Apr 2017 22:37:10 -0700 Subject: [PATCH] display output from wakatime-cli when debug mode turned on --- plugin/wakatime.vim | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index c3a80ef..50b8939 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -188,9 +188,19 @@ let s:VERSION = '4.0.14' echo 'Sending Heartbeat with Command: ' . s:JoinArgs(cmd) endif if s:IsWindows() - exec 'silent !start /min cmd /c "' . s:JoinArgs(cmd) . '"' + if s:is_debug_mode_on + let stdout = system('(' . s:JoinArgs(cmd) . ')') + if stdout != '' + echo stdout + endif + else + exec 'silent !start /min cmd /c "' . s:JoinArgs(cmd) . '"' + endif else let stdout = system(s:JoinArgs(cmd) . ' &') + if s:is_debug_mode_on && stdout != '' + echo stdout + endif endif call s:SetLastHeartbeat(a:time, a:time, file) endif