mirror of
https://github.com/amix/vimrc
synced 2025-06-30 11:54:59 +08:00
Updated plugins
This commit is contained in:
@ -3188,12 +3188,12 @@ function! fugitive#BufReadCmd(...) abort
|
||||
setlocal bufhidden=delete
|
||||
endif
|
||||
let &l:modifiable = modifiable
|
||||
call fugitive#MapJumps()
|
||||
if b:fugitive_type !=# 'blob'
|
||||
setlocal filetype=git
|
||||
call s:Map('n', 'a', ":<C-U>let b:fugitive_display_format += v:count1<Bar>exe fugitive#BufReadCmd(@%)<CR>", '<silent>')
|
||||
call s:Map('n', 'i', ":<C-U>let b:fugitive_display_format -= v:count1<Bar>exe fugitive#BufReadCmd(@%)<CR>", '<silent>')
|
||||
setlocal filetype=git
|
||||
endif
|
||||
call fugitive#MapJumps()
|
||||
endtry
|
||||
|
||||
setlocal modifiable
|
||||
@ -4265,7 +4265,7 @@ function! s:ReloadStatusBuffer(...) abort
|
||||
endif
|
||||
let original_lnum = a:0 ? a:1 : line('.')
|
||||
let info = s:StageInfo(original_lnum)
|
||||
call fugitive#BufReadStatus(0)
|
||||
exe fugitive#BufReadStatus(0)
|
||||
call setpos('.', [0, s:StageSeek(info, original_lnum), 1, 0])
|
||||
return ''
|
||||
endfunction
|
||||
|
@ -23,7 +23,7 @@ function! FugitiveGitDir(...) abort
|
||||
return g:fugitive_event
|
||||
endif
|
||||
let dir = get(b:, 'git_dir', '')
|
||||
if empty(dir) && (empty(bufname('')) || &buftype =~# '^\%(nofile\|acwrite\|quickfix\|terminal\|prompt\)$')
|
||||
if empty(dir) && (empty(bufname('')) && &filetype !=# 'netrw' || &buftype =~# '^\%(nofile\|acwrite\|quickfix\|terminal\|prompt\)$')
|
||||
return FugitiveExtractGitDir(getcwd())
|
||||
elseif (!exists('b:git_dir') || b:git_dir =~# s:bad_git_dir) && &buftype =~# '^\%(nowrite\)\=$'
|
||||
let b:git_dir = FugitiveExtractGitDir(bufnr(''))
|
||||
@ -425,6 +425,9 @@ function! FugitiveExtractGitDir(path) abort
|
||||
return get(a:path, 'fugitive_dir', get(a:path, 'git_dir', ''))
|
||||
elseif type(a:path) == type(0)
|
||||
let path = s:Slash(a:path > 0 ? bufname(a:path) : bufname(''))
|
||||
if getbufvar(a:path, '&filetype') ==# 'netrw'
|
||||
let path = s:Slash(getbufvar(a:path, 'netrw_curdir', path))
|
||||
endif
|
||||
else
|
||||
let path = s:Slash(a:path)
|
||||
endif
|
||||
|
Reference in New Issue
Block a user