diff options
| author | Rob Pilling <robpilling@gmail.com> | 2026-08-28 13:39:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-28 08:39:16 -0400 |
| commit | f5d4b5975d9f54426c258ddf6c3f802bc17bee1b (patch) | |
| tree | f0254a6cdce775daae10d7df0790b2438c661c55 /runtime/syntax/python.vim | |
| parent | fb083f3850c242e14613de517811a3818bef98db (diff) | |
| download | rneovim-f5d4b5975d9f54426c258ddf6c3f802bc17bee1b.tar.gz rneovim-f5d4b5975d9f54426c258ddf6c3f802bc17bee1b.tar.bz2 rneovim-f5d4b5975d9f54426c258ddf6c3f802bc17bee1b.zip | |
fix(tabpage): focusing a tab while closing it, fails assert #41475
Problem:
If an autocommand handler focuses the tab page we're closing during a
`:tabonly` (with some conditions), we hit an assert failure in
`win_close_othertab()`.
For this to occur, we need:
- `nvim_buf_delete()` to trigger `close_windows()` (as is done in
`cmdwin.lua`'s `_cleanup()`)
- `close_windows()` then calls `win_close_othertab()`, removing the
window (`win_free_mem()`)
- then in the caller, `tabpage_close_other()`, the loop continues (we
don't detect `tp_lastwin == wp` since we've unlinked the window)
- the loop assumes that `curtab != tp`
but we've refocused `curtab` so the `ex_win_close()` call passes `tp` as
`curtab`, causing the assert to fail
Solution:
Detect the focus of `curtab` and abort closing the tab.
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions