This PR debounces the handling of CursorMoved as not to spam the client with unnecessary calls. Note that this uses timer_start which I believe is available from vim 7.4, but it may not be available in some builds, so I included a sort of polyfill for timer_stop and timer_start which will at least run the function ignoring the timer functionality.
I also had to add a check on LanguageClient#handleCompleteChanged for the existence of timer_start, since we use it to prevent running into the textlock issue. There's probably another way to avoid that, but I'm not sure what that is now.
This PR debounces the handling of
CursorMoved
as not to spam the client with unnecessary calls. Note that this usestimer_start
which I believe is available from vim 7.4, but it may not be available in some builds, so I included a sort of polyfill fortimer_stop
andtimer_start
which will at least run the function ignoring the timer functionality.I also had to add a check on
LanguageClient#handleCompleteChanged
for the existence oftimer_start
, since we use it to prevent running into thetextlock
issue. There's probably another way to avoid that, but I'm not sure what that is now.