You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But that was removed (migrated to native Neovim API) in fdb2015.
With that API, it was possible for a caller to keep a reference to the returned dispose function and call it in order to clean-up all the book-keeping, including the stored reference to the function, but in practice I didn't actually do that anywhere. It would have been nice if we could have registered an autocmd that would do this clean-up whenever the buffer is destroyed (Vim itself gets rid of the mapping, but we still have that dangling reference to the callback function itself).
Keeping this open though, because there's a similar thing going on with autocmd() callbacks here:
Was originally thinking of callbacks created via the
map()
function, for example:wincent/aspects/nvim/files/.config/nvim/lua/wincent/vim/map.lua
Lines 11 to 41 in 1556492
But that was removed (migrated to native Neovim API) in fdb2015.
With that API, it was possible for a caller to keep a reference to the returned
dispose
function and call it in order to clean-up all the book-keeping, including the stored reference to the function, but in practice I didn't actually do that anywhere. It would have been nice if we could have registered an autocmd that would do this clean-up whenever the buffer is destroyed (Vim itself gets rid of the mapping, but we still have that dangling reference to the callback function itself).Keeping this open though, because there's a similar thing going on with
autocmd()
callbacks here:wincent/aspects/nvim/files/.config/nvim/lua/wincent/vim/autocmd.lua
Line 10 in 1556492
If the autocmd is set to run only once with
once
, Vim will clean up the autocmd itself, but our reference to the callback will linger on, forever.And here's the last one, where we hang on to
augroup()
callbacks forever:wincent/aspects/nvim/files/.config/nvim/lua/wincent/vim/augroup.lua
Line 12 in 1556492
The text was updated successfully, but these errors were encountered: