mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-02 16:33:52 +08:00
Handle FugitiveReal('') correctly
This commit is contained in:
1 parent
c5d4ce7479
commit
4643363b08
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -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?[\/]$??'))
|
||||
|
||||
Reference in new issue
Block a user