mirror of
https://github.com/preservim/nerdtree.git
synced 2025-02-12 21:25:16 +08:00
fix a bug with the Path#strForEditCmd() and relative paths
This commit is contained in:
parent
5e50601788
commit
8164fa09d3
|
@ -1903,9 +1903,11 @@ function! s:Path.strForEditCmd()
|
|||
let cwd = tolower(getcwd())
|
||||
endif
|
||||
|
||||
let cwd = cwd . s:os_slash
|
||||
|
||||
"return a relative path if we can
|
||||
if stridx(p, cwd) == 0
|
||||
let p = strpart(p, strlen(cwd)+1)
|
||||
let p = strpart(p, strlen(cwd))
|
||||
endif
|
||||
|
||||
if p == ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user