mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 19:33:50 -05:00
bugfix for paths on windows
delete oPath.NewMinimal cos it sucks and there is no need for it. It was causing a bug with oPath.Equals on account of it wasnt correctly determining whether a path found with s:GetSelectedPath() was a dir or a file.
This commit is contained in:
@@ -1078,18 +1078,6 @@ function! s:oPath.New(fullpath) dict
|
|||||||
return newPath
|
return newPath
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: oPath.NewMinimal() {{{3
|
|
||||||
function! s:oPath.NewMinimal(fullpath) dict
|
|
||||||
let newPath = copy(self)
|
|
||||||
let fullpath = s:oPath.WinToUnixPath(a:fullpath)
|
|
||||||
|
|
||||||
let newPath.pathSegments = split(fullpath, '/')
|
|
||||||
|
|
||||||
let newPath.isDirectory = isdirectory(fullpath)
|
|
||||||
|
|
||||||
return newPath
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
"FUNCTION: oPath.ReadInfoFromDisk(fullpath) {{{3
|
"FUNCTION: oPath.ReadInfoFromDisk(fullpath) {{{3
|
||||||
"
|
"
|
||||||
"
|
"
|
||||||
@@ -1810,8 +1798,9 @@ function! s:GetPath(ln)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
let curFile = dir . curFile
|
let curFile = t:NERDTreeRoot.path.drive . dir . curFile
|
||||||
return s:oPath.NewMinimal(curFile)
|
let toReturn = s:oPath.New(curFile)
|
||||||
|
return toReturn
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: s:GetSelectedDir() {{{2
|
"FUNCTION: s:GetSelectedDir() {{{2
|
||||||
|
|||||||
Reference in New Issue
Block a user