Allow ensureDocument and hasProvider to receive buffer number as optional argument
serranomorante opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
I call ensureDocument
and/or hasProvider
actions repeatedly over a period of 4 seconds because some coc-extensions can take that time to initialize. The thing is, during this time I might have opened another buffer (like with :term
) in which case ensureDocument
and hasProvider
will fail :( because those actions will now operate on the new term buffer number instead.
So in summary, the first time an extension initializes I have to wait patiently so my setup can work correctly (I use the result of those actions to execute some callbacks if they succeed).
Describe the solution you'd like
I would like ensureDocument
and/or hasProvider
to allow me to pass an optional buffer number so the previous issue doesn't happen.
Describe alternatives you've considered
I believe the're none.
Additional context
simplescreenrecorder-2024-12-07_20.36.35.webm
The hasProvider
already supported to accept buffer number. #4714
Thanks! ❤️