From 7866e83cc2e0b9382566e491d1f44f215b2aec3e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 13 Apr 2021 07:39:47 -0400 Subject: [PATCH] Fix :Gedit / --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index bac9c1b..8a35e8a 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4978,8 +4978,8 @@ function! fugitive#Open(cmd, bang, mods, arg, args) abort catch /^fugitive:/ return 'echoerr ' . string(v:exception) endtry - if file !~# '^\a\a\+:' - let file = s:sub(file, '/$', '') + if file !~# '^\a\a\+:' && !(has('win32') && file =~# '^\a:/$') + let file = substitute(file, '.\zs' . (has('win32') ? '[\/]' : '/') . '$', '', '') endif if a:cmd ==# 'edit' call s:BlurStatus()