mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Drop g:fugitive_legacy_quoting
This commit is contained in:
@@ -1953,22 +1953,14 @@ function! s:BufName(var) abort
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:ExpandVarLegacy(str) abort
|
|
||||||
if get(g:, 'fugitive_legacy_quoting', 0)
|
|
||||||
return substitute(a:str, '\\\ze[%#!]', '', 'g')
|
|
||||||
else
|
|
||||||
return a:str
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:ExpandVar(other, var, flags, esc, ...) abort
|
function! s:ExpandVar(other, var, flags, esc, ...) abort
|
||||||
let cwd = a:0 ? a:1 : getcwd()
|
let cwd = a:0 ? a:1 : getcwd()
|
||||||
if a:other =~# '^\'
|
if a:other =~# '^\'
|
||||||
return a:other[1:-1]
|
return a:other[1:-1]
|
||||||
elseif a:other =~# '^'''
|
elseif a:other =~# '^'''
|
||||||
return s:ExpandVarLegacy(substitute(a:other[1:-2], "''", "'", "g"))
|
return substitute(a:other[1:-2], "''", "'", "g")
|
||||||
elseif a:other =~# '^"'
|
elseif a:other =~# '^"'
|
||||||
return s:ExpandVarLegacy(substitute(a:other[1:-2], '""', '"', "g"))
|
return substitute(a:other[1:-2], '""', '"', "g")
|
||||||
elseif a:other =~# '^!'
|
elseif a:other =~# '^!'
|
||||||
let buffer = s:BufName(len(a:other) > 1 ? '#'. a:other[1:-1] : '%')
|
let buffer = s:BufName(len(a:other) > 1 ? '#'. a:other[1:-1] : '%')
|
||||||
let owner = s:Owner(buffer)
|
let owner = s:Owner(buffer)
|
||||||
|
|||||||
Reference in New Issue
Block a user