mirror of
https://github.com/lewis6991/gitsigns.nvim
synced 2025-02-25 01:06:53 +00:00
Implement on_reload buffer event callback
Should workaround unwanted cache invalidations. See #138, #139
This commit is contained in:
parent
dddd7b3f1e
commit
7667121978
@ -518,6 +518,11 @@ local attach = async(function(cbuf)
|
||||
api.nvim_buf_attach(cbuf, false, {
|
||||
on_lines = function(_, buf, _, _, last_orig, last_new)
|
||||
on_lines(buf, last_orig, last_new)
|
||||
end,
|
||||
on_reload = function()
|
||||
|
||||
|
||||
|
||||
end,
|
||||
on_detach = function(_, buf)
|
||||
detach(buf, true)
|
||||
|
@ -519,6 +519,11 @@ local attach = async(function(cbuf: integer)
|
||||
on_lines = function(_, buf: integer, _, _, last_orig: integer, last_new: integer)
|
||||
on_lines(buf, last_orig, last_new)
|
||||
end,
|
||||
on_reload = function()
|
||||
-- FIXME (lewis6991) Dummy callback to prevent unwanted detach events
|
||||
-- which Invalidate the cache. Probably need to update the signs here but
|
||||
-- for now do nothing. See #138, #139.
|
||||
end,
|
||||
on_detach = function(_, buf: integer)
|
||||
detach(buf, true)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user