minor refactor to Bookmark#toRoot()

This commit is contained in:
Martin Grenfell
2008-09-29 11:33:58 +13:00
parent 03dec4cde4
commit ed273e108d

View File

@@ -355,7 +355,7 @@ endfunction
function! s:Bookmark.toRoot()
if self.validate()
try
let targetNode = s:Bookmark.GetNodeForName(self.name, 1)
let targetNode = self.getNode(1)
catch /NERDTree.BookmarkedNodeNotFound/
let targetNode = s:TreeFileNode.New(s:Bookmark.BookmarkFor(self.name).path)
endtry