From 0860980e165b03016062ebe01772bc7fc966f681 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Wed, 10 Jul 2013 00:05:24 -0700 Subject: [PATCH] fixed bug in away function. --- README.md | 4 ++-- plugin/wakatime.vim | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2737be3..4f85344 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -vim-wakatime 0.2.1 -================== +vim-wakatime +============ Automatic time tracking for Vim. diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index fc21aee..a674f05 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -139,8 +139,8 @@ let s:VERSION = '0.2.1' return 0 endfunction - function! s:Away(now, prev) - let duration = a:now - a:prev + function! s:Away(now, last) + let duration = a:now - a:last[1] let units = 'seconds' if duration > 59 let duration = round(duration / 60)