mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-09 03:53:47 -05:00
Always convert backslashes on Windows
The old conditional was fine for most things, but this ensures that backslashes are used even for raw user input. References https://github.com/tpope/vim-fugitive/issues/1079
This commit is contained in:
@@ -82,7 +82,7 @@ function! s:warn(str) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:Slash(path) abort
|
function! s:Slash(path) abort
|
||||||
if exists('+shellslash') && !&shellslash
|
if exists('+shellslash')
|
||||||
return tr(a:path, '\', '/')
|
return tr(a:path, '\', '/')
|
||||||
else
|
else
|
||||||
return a:path
|
return a:path
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ function! FugitiveGenerate(...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:Slash(path) abort
|
function! s:Slash(path) abort
|
||||||
if exists('+shellslash') && !&shellslash
|
if exists('+shellslash')
|
||||||
return tr(a:path, '\', '/')
|
return tr(a:path, '\', '/')
|
||||||
else
|
else
|
||||||
return a:path
|
return a:path
|
||||||
|
|||||||
Reference in New Issue
Block a user