ember_tools.vim icon indicating copy to clipboard operation
ember_tools.vim copied to clipboard

`gf` callback execution breaks `unpack`

Open tragiclifestories opened this issue 8 years ago • 1 comments

As noted in the readme, the gf scripts require for the duration of their execution iskeyword to include the period character. However, it seems that the behaviour of the Unpack command depends on iskeyword not including a period character. So there's a race condition - if you call Unpack while the gf callback array is running, the result is nonsensical; for example:

const { Route.extend } = Ember.Route.extend;

export default Route.extend({});

Obviously the usual behaviour of w and b is altered during this time too, which is irritating.

I'm not sure what the underlying issue is - I have not configured any extra gf callbacks, so it's just the defaults. They're either (sometimes) taking a very long time or silently failing without setting iskeyword back to its pre-existing value. By the same token, I'm not sure how to reproduce the issue (although the specific problem with Unpack can be simulated just by set iskeyword+=.)

tragiclifestories avatar Sep 25 '16 09:09 tragiclifestories

This is interesting. I wouldn't really expect that gf would take a lot of time, and even if it did, I'm not sure that it would allow you to do something while it's working. It's supposed to be synchronous. It might be that, as you say, gf is silently failing or something. I'll check the iskeyword setting and unsetting, but could you give me an example of a particular gf that takes a lot of time for you?

AndrewRadev avatar Sep 29 '16 07:09 AndrewRadev