diff options
| author | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2025-07-16 10:18:19 +0100 |
|---|---|---|
| committer | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2025-07-22 13:36:33 +0100 |
| commit | 05a83265f9a4c2909b76630a977bfa0c95224819 (patch) | |
| tree | 6db1209e7391ada504eab11297635919c45c2fa6 /runtime/lua/vim/provider/python.lua | |
| parent | 3a36df9b13a57fc97a2fc411e59201ffd1ab30a3 (diff) | |
| download | rneovim-05a83265f9a4c2909b76630a977bfa0c95224819.tar.gz rneovim-05a83265f9a4c2909b76630a977bfa0c95224819.tar.bz2 rneovim-05a83265f9a4c2909b76630a977bfa0c95224819.zip | |
fix(autocmd): fire TabClosed after freeing tab page
Problem: TabClosed is fired after close_buffer is called (after b_nwindows is
decremented) and after the tab page is removed from the list, but before it's
freed. This causes inconsistencies such as the removed tabpage having a valid
handle and functions like nvim_tabpage_get_number returning nonsense.
Solution: fire it after free_tabpage. Try to maintain the Nvim-specific
behaviour of setting `<amatch>` to the old tab page number, and the
(undocumented) behaviour of setting `<abuf>` to the buffer it was showing
(close_buffer sets w_buffer to NULL if it was freed, so it should be OK pass it
to apply_autocmds_group, similar to before).
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions