From 7bdf33d37542f711eb619c6e6ca41d91f39ff83e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 19 Aug 2018 05:12:04 -0400 Subject: [PATCH] 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 --- autoload/fugitive.vim | 2 +- plugin/fugitive.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 6c284ce..e3192bd 100644 --- 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 index 2b5931f..3db9f7a 100644 --- 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