When saving a fugitive buffer, e.g. writing to the Git index for some file, the signs for the corresponding buffer in the working tree should be updated.
It is possible to get the corresponding buffer like this:
au BufWritePost fugitive:///* call StatuslineClearCacheFugitive()
function! StatuslineClearCacheFugitive()
let fug_buffer = fugitive#buffer()
let [gitdir, fug_path] = split(bufname('%'), '//')[1:2]
let fug_path = substitute(fug_path, '\v\w*/', '', '')
let fug_path = fug_buffer.repo().tree(fug_path)
let bufnr = bufnr(fug_path)
if bufnr != -1
call QuickfixsignsSet('BufWritePost', ..., bufnr)
endif
endfunction
While it would be nice to have this by default, I can imagine that it's too specific. But for that the QuickfixsignsSet function needs to have support for non-current buffers.
When saving a fugitive buffer, e.g. writing to the Git index for some file, the signs for the corresponding buffer in the working tree should be updated.
It is possible to get the corresponding buffer like this:
While it would be nice to have this by default, I can imagine that it's too specific. But for that the
QuickfixsignsSetfunction needs to have support for non-current buffers.