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: session restore for nerdtree buffers. #1405

Merged
merged 3 commits into from
Feb 7, 2024
Merged

fix: session restore for nerdtree buffers. #1405

merged 3 commits into from
Feb 7, 2024

Conversation

rzvxa
Copy link
Member

@rzvxa rzvxa commented Feb 5, 2024

Description of Changes

Closes #1397


New Version Info

This PR adds a new naming scheme for the NERDTree buffers, instead of having NERD_tree_[num] for all NERDTree buffers now we use NERD_tree_tab_[num] for tab buffers and NERD_tree_win_[num] for window buffers, This is then used during the restoration of a previously saved session to detect the type of given buffers and rescue them.

@rzvxa rzvxa requested a review from alerque February 5, 2024 17:41
@rzvxa rzvxa self-assigned this Feb 5, 2024
lib/nerdtree/creator.vim Outdated Show resolved Hide resolved
@rzvxa
Copy link
Member Author

rzvxa commented Feb 5, 2024

@terminatorul This should fix the issue with restoring sessions containing NERDTree buffers. Would you give it a try?

lib/nerdtree/creator.vim Outdated Show resolved Hide resolved
lib/nerdtree/creator.vim Outdated Show resolved Hide resolved
@terminatorul
Copy link

@terminatorul This should fix the issue with restoring sessions containing NERDTree buffers. Would you give it a try?

I tried it and it works fine ! Got rid of the previous errors on session load !

@rzvxa rzvxa merged commit 60b5e60 into master Feb 7, 2024
2 checks passed
@rzvxa rzvxa deleted the session-restore branch February 7, 2024 11:37
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.

Error when loading a vim session: BufLeave NERD_tree_* autocommand: Variable b:NERDTree does not exist
3 participants