parent
a27b899a36
commit
0103538d7a
@ -133,7 +133,7 @@ function! fugitive#extract_git_dir(path) abort
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! s:Detect(path)
|
||||
function! fugitive#detect(path)
|
||||
if exists('b:git_dir') && (b:git_dir ==# '' || b:git_dir =~# '/$')
|
||||
unlet b:git_dir
|
||||
endif
|
||||
@ -162,10 +162,10 @@ endfunction
|
||||
|
||||
augroup fugitive
|
||||
autocmd!
|
||||
autocmd BufNewFile,BufReadPost * call s:Detect(expand('<amatch>:p'))
|
||||
autocmd FileType netrw call s:Detect(expand('%:p'))
|
||||
autocmd User NERDTreeInit,NERDTreeNewRoot call s:Detect(b:NERDTreeRoot.path.str())
|
||||
autocmd VimEnter * if expand('<amatch>')==''|call s:Detect(getcwd())|endif
|
||||
autocmd BufNewFile,BufReadPost * call fugitive#detect(expand('<amatch>:p'))
|
||||
autocmd FileType netrw call fugitive#detect(expand('%:p'))
|
||||
autocmd User NERDTreeInit,NERDTreeNewRoot call fugitive#detect(b:NERDTreeRoot.path.str())
|
||||
autocmd VimEnter * if expand('<amatch>')==''|call fugitive#detect(getcwd())|endif
|
||||
autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave')
|
||||
augroup END
|
||||
|
||||
@ -2251,7 +2251,7 @@ augroup fugitive_temp
|
||||
\ if has_key(s:temp_files,expand('<afile>:p')) |
|
||||
\ let b:git_dir = s:temp_files[expand('<afile>:p')] |
|
||||
\ let b:git_type = 'temp' |
|
||||
\ call s:Detect(expand('<afile>:p')) |
|
||||
\ call fugitive#detect(expand('<afile>:p')) |
|
||||
\ setlocal bufhidden=delete |
|
||||
\ nnoremap <buffer> <silent> q :<C-U>bdelete<CR>|
|
||||
\ endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user