You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: rely on buffer enabled value rather than state enabled
## Details
Previously we used the global `state.enabled` value for the following:
- preventing autocommands callbacks from running
- enabling / disabling all attached buffers
- setting render state to default
These responsibilities have all been moved to the individual buffer
state. So autocommands are gated by that enabled value, same with
toggling buffers.
The main change in behavior is that disabled buffers now are attached to
since we need to attach to the buffer to listen for potential changes to
its state and trigger rendering.
This allows users to disable the plugin globally with the top level
`enabled` value, then render only the specific current buffer using the
`buf_toggle` API. Previously this would still not render buffers as the
global state remained disabled.
We still keep the `state.enabled` to determine what happens when the
`toggle` API is called since that modifies all attached buffers. The
behavior of this is not to toggle each buffer based on its state,
instead all buffers will end up being enabled or disabled, ignoring
individual changes using buffer level APIs.
0 commit comments