diff options
| author | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2026-02-07 17:02:54 +0000 |
|---|---|---|
| committer | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2026-02-08 16:12:00 +0000 |
| commit | da8de99d0bdc6684213de54905c56ca827a8836f (patch) | |
| tree | 97dcbd88d04e07e47356a6775ba6893986091f4f /test/functional/vimscript/string_spec.lua | |
| parent | d945a93d69c994dd7a88629ac3a59034f1184631 (diff) | |
| download | rneovim-da8de99d0bdc6684213de54905c56ca827a8836f.tar.gz rneovim-da8de99d0bdc6684213de54905c56ca827a8836f.tar.bz2 rneovim-da8de99d0bdc6684213de54905c56ca827a8836f.zip | |
fix(window): use real last buffer of closed window
Problem: close_buffer autocmds may switch buffers at the last moment when
closing a window, causing terminal_check_size to prefer the size of a closed
window, or TabClosed to set an old <abuf>.
Solution: use the actual last buffer, similar to what TabClosed did before.
NOTE: If buffer was unloaded/deleted (not wiped), then TabClosed's <abuf> may
not use it. (w_buffer = NULL) Maybe odd, but it's how it worked before anyhow.
Relies on close_buffer reliably setting w_buffer to NULL if freed, otherwise
buf_valid is better. Only concern I see is if the window wasn't in the window
list after closing the buffer (close_buffer won't set it to NULL then), but then
win_close{_othertab} should've returned earlier.
Diffstat (limited to 'test/functional/vimscript/string_spec.lua')
0 files changed, 0 insertions, 0 deletions