Fix issue with status reloading
This commit is contained in:
parent
ecb2157d7e
commit
8b3cd645fd
@ -1059,18 +1059,19 @@ endfunction
|
|||||||
|
|
||||||
function! s:BufReadIndex()
|
function! s:BufReadIndex()
|
||||||
if !exists('b:fugitive_display_format')
|
if !exists('b:fugitive_display_format')
|
||||||
let b:fugitive_display_format = filereadable(expand('<afile>').'.lock')
|
let b:fugitive_display_format = filereadable(expand('%').'.lock')
|
||||||
endif
|
endif
|
||||||
let b:fugitive_display_format = b:fugitive_display_format % 2
|
let b:fugitive_display_format = b:fugitive_display_format % 2
|
||||||
let b:fugitive_type = 'index'
|
let b:fugitive_type = 'index'
|
||||||
try
|
try
|
||||||
let b:git_dir = s:repo().dir()
|
let b:git_dir = s:repo().dir()
|
||||||
setlocal noro ma
|
setlocal noro ma
|
||||||
if fnamemodify($GIT_INDEX_FILE !=# '' ? $GIT_INDEX_FILE : b:git_dir . '/index', ':p') ==# expand('<amatch>:p')
|
if fnamemodify($GIT_INDEX_FILE !=# '' ? $GIT_INDEX_FILE : b:git_dir . '/index', ':p') ==# expand('%:p')
|
||||||
let indexspec = ''
|
let indexspec = ''
|
||||||
else
|
else
|
||||||
let indexspec = 'GIT_INDEX_FILE='.expand('<afile>').' '
|
let indexspec = 'GIT_INDEX_FILE='.expand('%').' '
|
||||||
endif
|
endif
|
||||||
|
let g:indexspec = indexspec
|
||||||
if b:fugitive_display_format
|
if b:fugitive_display_format
|
||||||
call s:ReplaceCmd(indexspec.s:repo().git_command('ls-files','--stage'))
|
call s:ReplaceCmd(indexspec.s:repo().git_command('ls-files','--stage'))
|
||||||
set ft=git nospell
|
set ft=git nospell
|
||||||
|
Loading…
Reference in New Issue
Block a user