From 20532803490dd946ca224722bcdaa10ba28a4e12 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Wed, 10 Jul 2013 01:11:50 -0700 Subject: [PATCH] fixed bug when getting last action from data file --- plugin/wakatime.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index abd51cc..68c845c 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -99,8 +99,8 @@ let s:VERSION = '0.2.1' if !filereadable(expand("$HOME/.wakatime.data")) return [0.0, '', 0.0] endif - let last = readfile(expand("$HOME/.wakatime.data"), '', 2) - if len(last) < 3 + let last = readfile(expand("$HOME/.wakatime.data"), '', 3) + if len(last) != 3 return [0.0, '', 0.0] endif return [str2float(last[0]), str2float(last[1]), last[2]]