mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Restore the cached _sortKey for faster processing.
Also add a new global variable to track when the g:NERDTreeSortOrder changes. If it has been changed, or when the cached _sortKey value is uninitialized, then calculate the sort key. This improves processing speed over the previous commit, and allows on-the-fly changes to the sort order, (without required vim to be restarted.)
This commit is contained in:
@@ -82,6 +82,7 @@ call s:initVariable("g:NERDTreeCascadeSingleChildDir", 1)
|
||||
if !exists("g:NERDTreeSortOrder")
|
||||
let g:NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$']
|
||||
endif
|
||||
let g:NERDTreeOldSortOrder = []
|
||||
|
||||
call s:initVariable("g:NERDTreeGlyphReadOnly", "RO")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user