From af236232a69bded4f60acb5563f7c19e9e99fa8a Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Tue, 16 May 2017 21:00:44 -0700 Subject: [PATCH] set last sent to current time to prevent sending heartbeats when first opening vim --- plugin/wakatime.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index 647a91f..50634b5 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -47,7 +47,7 @@ let s:VERSION = '5.0.1' let s:local_cache_expire = 10 " seconds between reading s:data_file let s:last_heartbeat = {'last_activity_at': 0, 'last_heartbeat_at': 0, 'file': ''} let s:heartbeats_buffer = [] - let s:last_sent = 0 + let s:last_sent = localtime() " For backwards compatibility, rename wakatime.conf to wakatime.cfg if !filereadable(s:config_file)