fix a bug with the Path#strForEditCmd() and relative paths

This commit is contained in:
Martin Grenfell 2009-01-23 23:43:47 +13:00
parent 5e50601788
commit 8164fa09d3

View File

@ -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 == ''