diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index aebbfb5..270cc61 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -435,7 +435,7 @@ function! s:DirCommitFile(path) abort return [vals[1], (vals[2] =~# '^.$' ? ':' : '') . vals[2], vals[3]] endfunction -function! fugitive#Filename(url) abort +function! fugitive#Path(url) abort let [dir, commit, file] = s:DirCommitFile(a:url) if len(dir) return s:PlatformSlash(FugitiveTreeForGitDir(dir) . file) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 22ecb28..1ab1660 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -138,10 +138,10 @@ function! FugitiveHead(...) abort return fugitive#repo().head(a:0 ? a:1 : 0) endfunction -function! FugitiveFilename(...) abort +function! FugitivePath(...) abort let file = fnamemodify(a:0 ? a:1 : @%, ':p') if file =~? '^fugitive:' - return fugitive#Filename(file) + return fugitive#Path(file) else return file endif