mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-10 15:25:57 +08:00
Don't browse to blob for empty buffer
This commit is contained in:
1 parent
b97a9abe29
commit
c13e0e1afd
1 file changed
+2
-2
@@ -5182,10 +5182,10 @@ function! s:BrowseCommand(line1, line2, range, count, bang, mods, reg, arg, args
|
|||||||
let path = '.git/' . full[strlen(dir)+1:-1]
|
let path = '.git/' . full[strlen(dir)+1:-1]
|
||||||
let type = ''
|
let type = ''
|
||||||
else
|
else
|
||||||
let path = full[strlen(s:Tree(dir))+1:-1]
|
let path = fugitive#Path(full, '/')[1:-1]
|
||||||
if path =~# '^\.git/'
|
if path =~# '^\.git/'
|
||||||
let type = ''
|
let type = ''
|
||||||
elseif isdirectory(full)
|
elseif isdirectory(full) || empty(path)
|
||||||
let type = 'tree'
|
let type = 'tree'
|
||||||
else
|
else
|
||||||
let type = 'blob'
|
let type = 'blob'
|
||||||
|
|||||||
Reference in new issue
Block a user