direnv / direnv.vim

vim plugin for direnv support
MIT License
177 stars 12 forks source link

debounces instead of exclusive calling #11

Closed kyoh86 closed 5 years ago

kyoh86 commented 5 years ago

When the direnv#export is called many times in a short time, only first one can be processed.

But I think that the last one should be processed.

So, I have changed the direnv#export debounces calling.

zimbatm commented 5 years ago

/cc @hauleth @halostatue for interpreting the language, I don't know anything about vimscript

halostatue commented 5 years ago

It looks reasonable, but I’ll have to read it over again at my computer. If the code gets called too frequently, it’s possible to wait forever for the debounce to complete.

We may want to consider an escape hatch of X debounce calls resulting in an actual call, depending on how things are triggered.

kyoh86 commented 5 years ago

I can solve that I have the direnv#export throttle calling instead of debouncing calling, right?

I'm not good at English, so please forgive me if I'm wrong.

halostatue commented 5 years ago

@zimbatm I think that these changes are good. If @kyoh86 feels they are complete, then it’s up to you.

zimbatm commented 5 years ago

thanks! waiting on @kyoh86's greenlight to merge

kyoh86 commented 5 years ago

I think that they are complete.

zimbatm commented 5 years ago

Thanks!