mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
fix: Make NERDTreeFind to handle directory case sensitivity (#1387)
Co-authored-by: Dan Gibson <danial.gibson@spin.net.au>
This commit is contained in:
@@ -549,7 +549,7 @@ function! s:Path.isUnder(parent)
|
||||
return 0
|
||||
endif
|
||||
for i in range(0, l:that_count-1)
|
||||
if self.pathSegments[i] !=# a:parent.pathSegments[i]
|
||||
if !nerdtree#pathEquals(self.pathSegments[i], a:parent.pathSegments[i])
|
||||
return 0
|
||||
endif
|
||||
endfor
|
||||
|
||||
@@ -121,8 +121,14 @@ function! s:TreeDirNode.findNode(path)
|
||||
if a:path.equals(self.path)
|
||||
return self
|
||||
endif
|
||||
if stridx(a:path.str(), self.path.str(), 0) ==# -1
|
||||
return {}
|
||||
if nerdtree#caseSensitiveFS()
|
||||
if stridx(a:path.str(), self.path.str(), 0) ==# -1
|
||||
return {}
|
||||
endif
|
||||
else
|
||||
if stridx(tolower(a:path.str()), tolower(self.path.str()), 0) ==# -1
|
||||
return {}
|
||||
endif
|
||||
endif
|
||||
|
||||
if self.path.isDirectory
|
||||
|
||||
Reference in New Issue
Block a user