From e9dc3637458616ea9f1a112652dd4b4678f251f9 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 19 Aug 2018 05:07:26 -0400 Subject: [PATCH] Fix check for need to convert Windows path slashes Closes 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 6ec3f6f..6c284ce 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 s:winshell() + if exists('+shellslash') && !&shellslash return tr(a:path, '\', '/') else return a:path diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index ef282b7..2b5931f 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -205,7 +205,7 @@ function! FugitiveGenerate(...) abort endfunction function! s:Slash(path) abort - if &shell =~? 'cmd' || exists('+shellslash') && !&shellslash + if exists('+shellslash') && !&shellslash return tr(a:path, '\', '/') else return a:path