-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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
endfunctionWhile 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels