commit 7bdf33d37542f711eb619c6e6ca41d91f39ff83e (tree)
parent e9dc3637458616ea9f1a112652dd4b4678f251f9
Author: Tim Pope <code@tpope.net>
Date: Sun, 19 Aug 2018 05:12:04 -0400
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
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -82,7 +82,7 @@ function! s:warn(str) abort
endfunction
function! s:Slash(path) abort
- if exists('+shellslash') && !&shellslash
+ if exists('+shellslash')
return tr(a:path, '\', '/')
else
return a:path
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -205,7 +205,7 @@ function! FugitiveGenerate(...) abort
endfunction
function! s:Slash(path) abort
- if exists('+shellslash') && !&shellslash
+ if exists('+shellslash')
return tr(a:path, '\', '/')
else
return a:path