-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Self-Diagnosis
Before creating an issue, take some time to search these resources for an answer. It's possible that someone else has already seen and solved your issue.
- old NERDTree issues
- NERDTree documentation -
:h NERDTree - NERDTree Wiki
- Other resources: https://stackoverflow.com, https://vi.stackexchange.com, etc.
Environment
- Operating System: Ubuntu 24.04.2
- Vim/Neovim version
:version:VIM - Vi IMproved 9.1 | Included patches: 1-1336 - NERDTree version, found on first line of quickhelp
?:7.1.3 - Are you using any of these NERDTree-dependent plugins?
- Provide a minimal .vimrc file that will reproduce the issue.
let s:test = expand('~/p/vimbug')
let &runtimepath = s:test . ',' . &runtimepath
let &packpath = &runtimepath
function! ConfigureNERDTree()
if exists("g:NERDTree")
noremap <F2> :NERDTreeMirror<CR>:NERDTreeToggle<CR>
" Open the existing NERDTree on each new tab.
autocmd BufWinEnter * if &buftype != 'quickfix' && getcmdwintype() == '' | silent NERDTreeMirror | endif
endif
endfunction
autocmd VimEnter * call ConfigureNERDTree()Steps to Reproduce the Issue
- Create the provided
.vimrcat~/p/vimbug - Run
vim -u ~/p/vimbug/.vimrc -N -n - Create 2 files, open each one in a tab. NERDTree buffer will be mirrored
- Run command
:mksession! - Quit vim
- Start vim again, this time with
-S, so the session is loaded:vim -u ~/p/vimbug/.vimrc -N -n -S - Error will show
- Inspect
Session.vim, you will notice two calls tofile NERD_tree_tab_1, the error is happening at the second one
Current Behavior (Include screenshots where appropriate.)
Errors when session is loaded.
Expected Result
Session loads as expected without error.
giggio