diff options
author | Peter Odding <peter@peterodding.com> | 2013-04-19 02:58:51 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2013-04-19 02:58:51 +0200 |
commit | 43ae6d7b7195517a9b91dc19464c2ff9112ccb55 (patch) | |
tree | 65f07695c8b5bd4d56b24bd6e03523c28eee2524 /misc/easytags | |
parent | ebe2ba9aedafeac5ffc19b52e9f6cf0d994e5726 (diff) | |
download | vim-easytags-43ae6d7b7195517a9b91dc19464c2ff9112ccb55.tar.gz |
Workaround low 'updatetime' intelligently
This should hopefully resolve the following issues and pull
requests: #31, #33, #42. I tried several of their suggestions
in Vim 7.2 & 7.3 but it didn't work as it should IMHO.
All of the issues and pull requests seem to imply that CursorHold
events fire continuously when you set a low enough updatetime, but
in my testing on Vim 7.2 and 7.3 this is not true. The event fires
once, then Vim waits for user input before any new events fire.
I'm not sure exactly what user input is required; moving the
text cursor is not always enough but mode switching is.
So what happens (in my testing) with all of the proposed solutions is
that you stop typing for 'updatetime' milliseconds, the event fires, the
plug-in simply increments or decrements a counter and then Vim just sits
there doing absolutely nothing expect blinking the cursor...
What I'm now trying instead is to remember the last time the plug-in was
executed (the result of localtime()) and not acting on the CursorHold
event until the following condition holds true:
localtime() > (last_automatic_run + (easytags_updatetime_min/1000))
I hope this provides a reliable solution. In any case it should be
better than the previous annoying behavior :-)
Diffstat (limited to 'misc/easytags')
0 files changed, 0 insertions, 0 deletions