Rewrite the "Path._strForCd()" method
This commit is the first in a series of commits that will rework some of the methods responsible for escaping pathnames. Some of these methods simply don't use the features that Vim has properly. The custom "Path._escChars()" method is far too rigid for our purposes, and better options have been available for some time. See ":h fnameescape()" for an especially helpful function in this effort.
This commit is contained in:
parent
1a121337dd
commit
b5e54d255e
@ -705,10 +705,10 @@ function! s:Path._strForUI()
|
||||
endfunction
|
||||
|
||||
" FUNCTION: Path._strForCd() {{{1
|
||||
"
|
||||
" returns a string that can be used with :cd
|
||||
" Return a string representation of this Path that is suitable for use as an
|
||||
" argument to Vim's internal ":cd" command.
|
||||
function! s:Path._strForCd()
|
||||
return escape(self.str(), self._escChars())
|
||||
return fnameescape(self.str())
|
||||
endfunction
|
||||
|
||||
" FUNCTION: Path._strForEdit() {{{1
|
||||
|
Loading…
x
Reference in New Issue
Block a user