fixed bug when getting last action from data file
This commit is contained in:
parent
955e078e2f
commit
2053280349
1 changed files with 2 additions and 2 deletions
|
@ -99,8 +99,8 @@ let s:VERSION = '0.2.1'
|
||||||
if !filereadable(expand("$HOME/.wakatime.data"))
|
if !filereadable(expand("$HOME/.wakatime.data"))
|
||||||
return [0.0, '', 0.0]
|
return [0.0, '', 0.0]
|
||||||
endif
|
endif
|
||||||
let last = readfile(expand("$HOME/.wakatime.data"), '', 2)
|
let last = readfile(expand("$HOME/.wakatime.data"), '', 3)
|
||||||
if len(last) < 3
|
if len(last) != 3
|
||||||
return [0.0, '', 0.0]
|
return [0.0, '', 0.0]
|
||||||
endif
|
endif
|
||||||
return [str2float(last[0]), str2float(last[1]), last[2]]
|
return [str2float(last[0]), str2float(last[1]), last[2]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue