]> git.gir.st - VimFx.git/commit
Fix issues when updating VimFx
authorSimon Lydell <simon.lydell@gmail.com>
Wed, 24 Feb 2016 07:03:39 +0000 (08:03 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Wed, 24 Feb 2016 07:42:59 +0000 (08:42 +0100)
commit865fdabaef02f371dac1dbb57a4b6a8b01218d9b
tree85c05c0dc91a4600e34e5123546e00b8d95b68ba
parente0ae646ed990b10b50b502fc3f3427dbd1c48021
Fix issues when updating VimFx

After having updated VimFx, trying to use the `f` command on toggle buttons
often failed. This was because the frame script message listeners from the old
version wasn't shut down properly, which resulted in there being _two_ listeners
for the message to simulate a click on an element. The effects of this was
especially noticeable on toggle buttons, because clicking a toggle button twice
is a no-op. That gave the impression of VimFx failing to simulate a click at
all.

I think this erraneous shutdown behavior must have been introduced in commit
24b701e9, which switched from a synchronous message passing to an asynchronous
one in bootstrap.coffee. Previously, the shutdown message listener for frame
scripts had to be added after a timeout. Since mentioned commit, that timeout is
added in the response callback for the mentioned asynchronous message, which
should make the timeout unnecessary, but the timeout was still kept in that
commit. It shouldn't matter, but somehow it does. Removing the timeout fixes the
double message listeners problem, and does not seem to re-introduce the problems
that were fixed be adding the timeout in the first place (commit ec3a4394).
extension/bootstrap.coffee
Imprint / Impressum