]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1253: abort when closing window with attached quickfix data v9.1.1253
authorChristian Brabandt <cb@256bit.org>
Fri, 28 Mar 2025 18:13:32 +0000 (19:13 +0100)
committerChristian Brabandt <cb@256bit.org>
Fri, 28 Mar 2025 18:13:32 +0000 (19:13 +0100)
commitce80c59bfd3c0087a354ee549639ca60fa192fba
tree4d4dfc1a5379aeac572ceaea558ee14f5c3da41f
parentc5aad6cca534fe3c4e0f3105f172d43d0852ea27
patch 9.1.1253: abort when closing window with attached quickfix data

Problem:  If win_close() is called with a window that has quickfix stack
          attached to it, the corresponding quickfix buffer will be
          closed and freed after the buffer was already closed. At that
          time curwin->w_buffer points to NULL, which the CHECK_CURBUF
          will catch and abort if ABORT_ON_ERROR is defined
Solution: in wipe_qf_buffer() temporarily point curwin->w_buffer back to
          curbuf, the window will be closed anyhow, so it shouldn't
          matter that curbuf->b_nwindows isn't incremented.

closes: #16993
closes: #16985

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/quickfix.c
src/testdir/test_quickfix.vim
src/version.c