prevent writing to data file more than once in 5 seconds

This commit is contained in:
Alan Hamlett 2013-07-10 00:21:47 -07:00
parent 0860980e16
commit 02ad6aa5ce

View file

@ -181,8 +181,10 @@ let s:VERSION = '0.2.1'
call s:Api(targetFile, now, last[0], 0, last) call s:Api(targetFile, now, last[0], 0, last)
endif endif
else else
if now - last[1] > 5:
call s:SetLastAction(last[0], targetFile) call s:SetLastAction(last[0], targetFile)
endif endif
endif
endfunction endfunction
function! s:writeAction() function! s:writeAction()