Skip to content

refactor(#2826): multi instance view #3109

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

alex-courtis
Copy link
Member

@alex-courtis alex-courtis commented Apr 20, 2025

fixes #2826

View does not mutate options, hence no need to deep clone anything.

Preserved the tab states bits; they still function as there is still one and only one explorer.

Testing methodology:

  1. Add an error("$callsite") at each call to a View method
  2. Test to ensure error is raised
  3. Remove error
  4. Repeat test to ensure correctness

@alex-courtis alex-courtis marked this pull request as draft April 20, 2025 06:46
@alex-courtis alex-courtis changed the title refactor(#2826): singleton View class, WIP refactor(#2826): multi instance view Apr 21, 2025
@alex-courtis alex-courtis requested a review from raaymax April 21, 2025 04:15
@alex-courtis alex-courtis marked this pull request as ready for review April 21, 2025 04:15
@alex-courtis
Copy link
Member Author

alex-courtis commented Apr 21, 2025

Apologies @raaymax I abandoned trying to rebase #2864 , I applied the changes by hand. Notable:

  • Did not do the deep clone of the options member; they are not mutated by view nor callers
  • Used classic class structure

I'd be most grateful for your review; any problems you remember would be good to check.

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.

Multi Instance: Refactor: nvim-tree.view
1 participant