mirror of
https://github.com/neovim/neovim.git
synced 2026-02-21 09:50:19 +10:00
Problem: on_detach may be called after buf_freeall and other important things, plus its textlock restrictions are insufficient. This can cause issues such as leaks, internal errors and crashes. Solution: disable buffer updates in buf_freeall, before autocommands (like the order after #35355 and when do_ecmd reloads a buffer). Don't do so in free_buffer_stuff; it's not safe to run user code there, and buf_freeall already runs before then; just free them to avoid leaks if buf_freeall autocommands registered more for some reason. Fixes #28084 Fixes #33967 Fixes #35116
46 KiB
46 KiB