Skip to content

Commit

Permalink
Merge pull request #453 from WoLpH/patch-1
Browse files Browse the repository at this point in the history
Fixed incompatibility with older Vim versions
  • Loading branch information
scrooloose committed Jun 17, 2015
2 parents af85499 + 013c607 commit 96c0774
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/nerdtree/path.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
"============================================================
Expand Down

0 comments on commit 96c0774

Please sign in to comment.