]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.2087: Crash when using :tabonly in BufUnload v9.1.2087
authorzeertzjq <zeertzjq@outlook.com>
Fri, 16 Jan 2026 18:25:29 +0000 (18:25 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 16 Jan 2026 18:25:29 +0000 (18:25 +0000)
commitfa64f92f6ab8b8080bdba77155e7bb3530fa21f6
treeb4cc79e4630c436bc794f0b9ec2820f94c182672
parenta1895b67b780ca3d92c3d2687d8440569810a153
patch 9.1.2087: Crash when using :tabonly in BufUnload

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:  #19088#issuecomment-3710172769
closes: #19186

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/buffer.c
src/testdir/test_autocmd.vim
src/version.c
src/window.c