mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Refactor the "Path" constructor
This commit is contained in:
@@ -541,17 +541,16 @@ function! s:Path.equals(path)
|
|||||||
return self.str() ==# a:path.str()
|
return self.str() ==# a:path.str()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: Path.New() {{{1
|
" FUNCTION: Path.New(pathStr) {{{1
|
||||||
" The Constructor for the Path object
|
function! s:Path.New(pathStr)
|
||||||
function! s:Path.New(path)
|
let l:newPath = copy(self)
|
||||||
let newPath = copy(self)
|
|
||||||
|
|
||||||
call newPath.readInfoFromDisk(s:Path.AbsolutePathFor(a:path))
|
call l:newPath.readInfoFromDisk(s:Path.AbsolutePathFor(a:pathStr))
|
||||||
|
|
||||||
let newPath.cachedDisplayString = ""
|
let l:newPath.cachedDisplayString = ''
|
||||||
let newPath.flagSet = g:NERDTreeFlagSet.New()
|
let l:newPath.flagSet = g:NERDTreeFlagSet.New()
|
||||||
|
|
||||||
return newPath
|
return l:newPath
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: Path.Slash() {{{1
|
" FUNCTION: Path.Slash() {{{1
|
||||||
|
|||||||
Reference in New Issue
Block a user