vim-session icon indicating copy to clipboard operation
vim-session copied to clipboard

Wrong calls to NERDTree root path

Open sigzegv opened this issue 8 years ago • 1 comments

According to this https://github.com/Xuyuanp/nerdtree-git-plugin/pull/41/files, you should be calling b:NERDTree.root instead of b:NERDTreeRoot in https://github.com/xolox/vim-session/blob/master/autoload/xolox/session.vim.

b:NERDTreeRoot is never detected and only vim's cwd is saved in session.

sigzegv avatar Sep 10 '16 17:09 sigzegv

Thanks! I found this when looking for why NERDtree was opened but the root directory was in the wrong place. For example if you have multiple tabs and you have navigated NERDtree to different directories for different projects.

I did a grep on the code ` ~/.vim/bundle/vim-session 9e9a6088 master 2.13.1

mg b:NERDTreeRoot autoload/xolox/session.vim:305: if exists('b:NERDTreeRoot') autoload/xolox/session.vim:308: let argument = b:NERDTreeRoot.path.str() autoload/xolox/session.vim:364: if exists('b:NERDTreeRoot') autoload/xolox/session.vim:365: return 'NERDTree ' . fnameescape(b:NERDTreeRoot.path.str()) . ' | only' `

Replacing all instances from b:NERDTreeRoot to b:NERDTree.root fixes the restore of all the NERDTree tabs!

RodriguezLucha avatar Jun 11 '18 23:06 RodriguezLucha