mirror of
https://github.com/preservim/nerdtree.git
synced 2025-02-18 10:32:45 +08:00
Fixed incompatibility with older Vim versions
Fixed incompatibility with older Vim versions that are compiled without float function support such as `log10` and `ceil` This fixes #452
This commit is contained in:
parent
af85499eda
commit
013c607ba4
|
@ -2,8 +2,11 @@
|
|||
"once here
|
||||
let s:NERDTreeSortStarIndex = index(g:NERDTreeSortOrder, '*')
|
||||
" used in formating sortKey, e.g. '%04d'
|
||||
let s:sortKeyFormat = "%0" . float2nr(ceil(log10(len(g:NERDTreeSortOrder)))) . "d"
|
||||
|
||||
if exists("log10")
|
||||
let s:sortKeyFormat = "%0" . float2nr(ceil(log10(len(g:NERDTreeSortOrder)))) . "d"
|
||||
else
|
||||
let s:sortKeyFormat = "%04d"
|
||||
endif
|
||||
|
||||
"CLASS: Path
|
||||
"============================================================
|
||||
|
|
Loading…
Reference in New Issue
Block a user