mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53:48 -05:00
Remove AddDefaultGroupToSortOrder check from startup.
The call to AddDefaultGroupToSortOrder in NERD_tree.vim is redundant because it's also done every time sortChildren is called. And since the check is done only once, there's no need for a function either. sortChildren now just contains the needed if statement.
This commit is contained in:
@@ -607,7 +607,9 @@ endfunction
|
||||
" FUNCTION: TreeDirNode.sortChildren() {{{1
|
||||
" Sort "self.children" by alphabetical order and directory priority.
|
||||
function! s:TreeDirNode.sortChildren()
|
||||
call AddDefaultGroupToSortOrder()
|
||||
if count(g:NERDTreeSortOrder, '*') < 1
|
||||
call add(g:NERDTreeSortOrder, '*')
|
||||
endif
|
||||
let CompareFunc = function("nerdtree#compareNodesBySortKey")
|
||||
call sort(self.children, CompareFunc)
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user