mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
add oTreeFileNode.CacheParent()
This commit is contained in:
@@ -154,6 +154,17 @@ exec "autocmd BufWinLeave *". s:NERDTreeWinName ."* :call <SID>SaveScreenState()
|
||||
"classes.
|
||||
"============================================================
|
||||
let s:oTreeFileNode = {}
|
||||
"FUNCTION: oTreeFileNode.CacheParent {{{3
|
||||
"initializes self.parent if it isnt already
|
||||
function! s:oTreeFileNode.CacheParent() dict
|
||||
if empty(self.parent)
|
||||
let parentPath = self.path.GetParent()
|
||||
if parentPath.Equals(self.path)
|
||||
throw "NERDTree.CannotCacheParent exception: already at root"
|
||||
endif
|
||||
let self.parent = s:oTreeFileNode.New(parentPath)
|
||||
endif
|
||||
endfunction
|
||||
"FUNCTION: oTreeFileNode.CompareNodes {{{3
|
||||
"This is supposed to be a class level method but i cant figure out how to
|
||||
"get func refs to work from a dict..
|
||||
|
||||
Reference in New Issue
Block a user