mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
fixed: directory navigation does not work on Cygwin
Directory tree navigation is broken because of directory signs which is shown in UTF-8. Cygwin is a Windows application, so it uses ASCII codepages and so directory signs must be in ASCII, but if to modify "nerdtree#runningWindows" function there are many other functions break that convert paths, e.g. So, the quick and reliable solution is to add a separate function "nerdtree#runningCygwin" and use it in a specific place.
This commit is contained in:
@@ -155,6 +155,11 @@ function! nerdtree#runningWindows()
|
|||||||
return has("win16") || has("win32") || has("win64")
|
return has("win16") || has("win32") || has("win64")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
"FUNCTION: nerdtree#runningCygwin(dir) {{{2
|
||||||
|
function! nerdtree#runningCygwin()
|
||||||
|
return has("win32unix")
|
||||||
|
endfunction
|
||||||
|
|
||||||
" SECTION: View Functions {{{1
|
" SECTION: View Functions {{{1
|
||||||
"============================================================
|
"============================================================
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ call s:initVariable("g:NERDTreeShowHidden", 0)
|
|||||||
call s:initVariable("g:NERDTreeShowLineNumbers", 0)
|
call s:initVariable("g:NERDTreeShowLineNumbers", 0)
|
||||||
call s:initVariable("g:NERDTreeSortDirs", 1)
|
call s:initVariable("g:NERDTreeSortDirs", 1)
|
||||||
|
|
||||||
if !nerdtree#runningWindows()
|
if !nerdtree#runningWindows() && !nerdtree#runningCygwin()
|
||||||
call s:initVariable("g:NERDTreeDirArrowExpandable", "▸")
|
call s:initVariable("g:NERDTreeDirArrowExpandable", "▸")
|
||||||
call s:initVariable("g:NERDTreeDirArrowCollapsible", "▾")
|
call s:initVariable("g:NERDTreeDirArrowCollapsible", "▾")
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user