Handle FugitiveReal('') correctly

This commit is contained in:
Tim Pope
2018-07-28 19:31:11 -04:00
parent c5d4ce7479
commit 4643363b08
2 changed files with 3 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ function! FugitiveReal(...) abort
let file = a:0 ? a:1 : @%
if file =~? '^fugitive:' || a:0 > 1
return call('fugitive#Real', [file] + a:000[1:-1])
elseif file =~# '^/\|^\a\+:'
elseif file =~# '^/\|^\a\+:\|^$'
return file
else
return fnamemodify(file, ':p' . (file =~# '[\/]$' ? '' : ':s?[\/]$??'))