Fix nerdtree#version() on Windows.
This commit is contained in:
parent
cce6fb373f
commit
ca16df25fa
@ -1,6 +1,7 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
#### 5.2...
|
#### 5.2...
|
||||||
|
- **.1**: Fix nerdtree#version() on Windows. (PhilRunninger) N/A
|
||||||
- **.0**: Expand functionality of `<CR>` mapping. (PhilRunninger) #1011
|
- **.0**: Expand functionality of `<CR>` mapping. (PhilRunninger) #1011
|
||||||
#### 5.1...
|
#### 5.1...
|
||||||
- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) #1009
|
- **.3**: Remove @mentions from PR template and change log. They weren't working. (PhilRunninger) #1009
|
||||||
|
@ -3,8 +3,9 @@ if exists("g:loaded_nerdtree_autoload")
|
|||||||
endif
|
endif
|
||||||
let g:loaded_nerdtree_autoload = 1
|
let g:loaded_nerdtree_autoload = 1
|
||||||
|
|
||||||
|
let s:rootNERDTreePath = resolve(expand("<sfile>:p:h:h"))
|
||||||
function! nerdtree#version(...)
|
function! nerdtree#version(...)
|
||||||
let l:changelog = readfile(expand("<sfile>:p:h")."/CHANGELOG.md")
|
let l:changelog = readfile(join([s:rootNERDTreePath, "CHANGELOG.md"], nerdtree#slash()))
|
||||||
let l:text = 'Unknown'
|
let l:text = 'Unknown'
|
||||||
let l:line = 0
|
let l:line = 0
|
||||||
while l:line <= len(l:changelog)
|
while l:line <= len(l:changelog)
|
||||||
@ -21,6 +22,19 @@ endfunction
|
|||||||
" SECTION: General Functions {{{1
|
" SECTION: General Functions {{{1
|
||||||
"============================================================
|
"============================================================
|
||||||
|
|
||||||
|
function! nerdtree#slash()
|
||||||
|
|
||||||
|
if nerdtree#runningWindows()
|
||||||
|
if exists('+shellslash') && &shellslash
|
||||||
|
return '/'
|
||||||
|
endif
|
||||||
|
|
||||||
|
return '\'
|
||||||
|
endif
|
||||||
|
|
||||||
|
return '/'
|
||||||
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: nerdtree#and(x,y) {{{2
|
"FUNCTION: nerdtree#and(x,y) {{{2
|
||||||
" Implements and() function for Vim <= 7.2
|
" Implements and() function for Vim <= 7.2
|
||||||
function! nerdtree#and(x,y)
|
function! nerdtree#and(x,y)
|
||||||
|
Loading…
Reference in New Issue
Block a user