move TreeFileNode.makeRoot() to NERDTree.changeRoot(node)

This commit is contained in:
Martin Grenfell
2015-11-16 13:17:59 +00:00
parent 71ee64fed7
commit cedb40b4f5
5 changed files with 25 additions and 29 deletions

View File

@@ -275,9 +275,7 @@ function! s:Bookmark.toRoot()
catch /^NERDTree.BookmarkedNodeNotFoundError/
let targetNode = g:NERDTreeFileNode.New(s:Bookmark.BookmarkFor(self.name).path)
endtry
call targetNode.makeRoot()
call b:NERDTree.render()
call targetNode.putCursorHere(0, 0)
call b:NERDTree.changeRoot(targetNode)
endif
endfunction