From 108e2e5024c69fa3587c7dd33465a339b7126dd7 Mon Sep 17 00:00:00 2001 From: yogesh nachnani Date: Sun, 30 Apr 2017 17:24:19 +0530 Subject: [PATCH] makes plugin compatible with old vim installations that do not have quitpre --- plugin/wakatime.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index b8d181f..c0434fe 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -455,7 +455,9 @@ let s:VERSION = '5.0.1' autocmd BufEnter,VimEnter * call s:InitAndHandleActivity(s:false) autocmd CursorMoved,CursorMovedI * call s:HandleActivity(s:false) autocmd BufWritePost * call s:HandleActivity(s:true) - autocmd QuitPre * call s:SendHeartbeats() + if exists('##QuitPre') + autocmd QuitPre * call s:SendHeartbeats() + endif augroup END " }}}