fix(treesitter): properly restore 'syntax' (#21358)

This commit is contained in:
Lewis Russell
2022-12-14 15:00:48 +00:00
committed by GitHub
parent 090048bec9
commit d127c684fa
4 changed files with 19 additions and 6 deletions

View File

@@ -147,6 +147,15 @@ void buf_updates_unregister(buf_T *buf, uint64_t channelid)
}
}
void buf_free_callbacks(buf_T *buf)
{
kv_destroy(buf->update_channels);
for (size_t i = 0; i < kv_size(buf->update_callbacks); i++) {
buffer_update_callbacks_free(kv_A(buf->update_callbacks, i));
}
kv_destroy(buf->update_callbacks);
}
void buf_updates_unload(buf_T *buf, bool can_reload)
{
size_t size = kv_size(buf->update_channels);