mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-10 12:23:49 -05:00
continue breaking down the epic autoload module
Add 2 new classes and move code into them from autoload: * NERDTree. Each nerdtree buffer now has a NERDTree object that holds the root node and will old other util functions * UI. Each NERDTree object holds a UI object which is responsible for rendering, getting the current node, etc Still a fair few methods to sort through in autoload (many of which will end up in the above classes) - need sleep though.
This commit is contained in:
@@ -21,7 +21,7 @@ unlet s:TreeDirNode.activate
|
||||
function! s:TreeDirNode.activate(...)
|
||||
let opts = a:0 ? a:1 : {}
|
||||
call self.toggleOpen(opts)
|
||||
call nerdtree#renderView()
|
||||
call b:NERDTree.render()
|
||||
call self.putCursorHere(0, 0)
|
||||
endfunction
|
||||
|
||||
@@ -450,7 +450,7 @@ function! s:TreeDirNode.reveal(path)
|
||||
|
||||
if self.path.equals(a:path.getParent())
|
||||
let n = self.findNode(a:path)
|
||||
call nerdtree#renderView()
|
||||
call b:NERDTree.render()
|
||||
call n.putCursorHere(1,0)
|
||||
return
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user