dont convert windows paths to lower case when :editing

This fixes #89.
This commit is contained in:
Martin Grenfell 2012-01-05 08:24:15 +00:00
parent 3be5f5ddd8
commit 4337022524

View File

@ -2522,20 +2522,18 @@ endfunction
"Return: the string for this path that is suitable to be used with the :edit "Return: the string for this path that is suitable to be used with the :edit
"command "command
function! s:Path._strForEdit() function! s:Path._strForEdit()
let p = self.str({'format': 'UI'}) let p = escape(self.str({'format': 'UI'}), s:escape_chars)
let cwd = getcwd() let cwd = getcwd() . s:Path.Slash()
if s:running_windows
let p = tolower(self.str())
let cwd = tolower(getcwd())
endif
let p = escape(p, s:escape_chars)
let cwd = cwd . s:Path.Slash()
"return a relative path if we can "return a relative path if we can
if stridx(p, cwd) ==# 0 let isRelative = 0
if s:running_windows
let isRelative = stridx(tolower(p), tolower(cwd)) == 0
else
let isRelative = stridx(p, cwd) == 0
endif
if isRelative
let p = strpart(p, strlen(cwd)) let p = strpart(p, strlen(cwd))
"handle the edge case where the file begins with a + (vim interprets "handle the edge case where the file begins with a + (vim interprets
@ -2550,7 +2548,6 @@ function! s:Path._strForEdit()
endif endif
return p return p
endfunction endfunction
"FUNCTION: Path._strForGlob() {{{3 "FUNCTION: Path._strForGlob() {{{3
function! s:Path._strForGlob() function! s:Path._strForGlob()