Skip to content

Crash when using :tabonly in BufUnload#19186

Closed
zeertzjq wants to merge 1 commit intovim:masterfrom
zeertzjq:bufunload-tabonly
Closed

Crash when using :tabonly in BufUnload#19186
zeertzjq wants to merge 1 commit intovim:masterfrom
zeertzjq:bufunload-tabonly

Conversation

@zeertzjq
Copy link
Member

@zeertzjq zeertzjq commented Jan 16, 2026

Problem: Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
buffer if there are no other buffers. Don't decrement
b_nwindows if it was 0 before buf_freeall().

@zeertzjq zeertzjq marked this pull request as draft January 16, 2026 06:16
@zeertzjq zeertzjq marked this pull request as ready for review January 16, 2026 06:35
@zeertzjq
Copy link
Member Author

Oh, it appears that this fixes #19088 (comment) as well.

Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall().
@chrisbra
Copy link
Member

thanks

@chrisbra chrisbra closed this in fa64f92 Jan 16, 2026
@zeertzjq zeertzjq deleted the bufunload-tabonly branch January 16, 2026 21:51
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Jan 16, 2026
Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall() (zeertzjq).

fixes:  vim/vim#19088#issuecomment-3710172769
closes: vim/vim#19186

vim/vim@fa64f92
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Jan 16, 2026
Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall() (zeertzjq).

fixes:  vim/vim#19088#issuecomment-3710172769
closes: vim/vim#19186

vim/vim@fa64f92
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Jan 17, 2026
Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall() (zeertzjq).

fixes:  vim/vim#19088#issuecomment-3710172769
closes: vim/vim#19186

vim/vim@fa64f92
github-actions bot pushed a commit to neovim/neovim that referenced this pull request Jan 17, 2026
Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall() (zeertzjq).

fixes:  vim/vim#19088#issuecomment-3710172769
closes: vim/vim#19186

vim/vim@fa64f92
(cherry picked from commit eb5a7cc)
github-actions bot pushed a commit to neovim/neovim that referenced this pull request Jan 17, 2026
Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall() (zeertzjq).

fixes:  vim/vim#19088#issuecomment-3710172769
closes: vim/vim#19186

vim/vim@fa64f92
(cherry picked from commit eb5a7cc)
iurymarques pushed a commit to iurymarques/neovim that referenced this pull request Feb 7, 2026
Problem:  Crash when using :tabonly in BufUnload.
Solution: Set curbuf when setting curwin->w_buffer. Don't wipe out a
          buffer if there are no other buffers. Don't decrement
          b_nwindows if it was 0 before buf_freeall() (zeertzjq).

fixes:  vim/vim#19088#issuecomment-3710172769
closes: vim/vim#19186

vim/vim@fa64f92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants