mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-07 04:34:39 +08:00
Delegate to other real filename implementations
This commit is contained in:
1 parent
a3e9518186
commit
40e2dcba05
2 files changed
+11
-6
No files matched your search
+2
-2
@@ -34,9 +34,9 @@ endfunction
|
||||
|
||||
function! FugitiveReal(...) abort
|
||||
let file = a:0 ? a:1 : @%
|
||||
if file =~? '^fugitive:' || a:0 > 1
|
||||
if file =~# '^\a\a\+:' || 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