Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop autocmds from duplicating on each SSR open #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

A-Lamia
Copy link
Contributor

@A-Lamia A-Lamia commented Aug 12, 2023

SSR creates instances when Ui:Open is executed but the autocmds are not treated like an instance they are sharing the same autocmds, these autocmds however are being duplicated on each run of Ui:Open causing bad side effects like data invalidation.

On instance creation a unique augroup is created and assigned and only one set of autocmds are allowed to exist each instance, when that instance of SSR is closed the assigned autocmds and augroup is removed for that instance only.

SSR creates instances when you Ui:Open but the autocmds are not treated
like an instance they are sharing the same autocmds, these autocmds how
ever are being duplicated on each run of Ui:Open causing bad side effects
like data invalidation changes in this commit creates a unique augroup
and allows only one autocmd per instance then removes them once the
instance is closed.
@cshuaimin
Copy link
Owner

autocmd group is also added in #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants