Commit: patch 9.2.0022: bt_quickfix() is slow

0 views
Skip to first unread message

Christian Brabandt

unread,
Feb 18, 2026, 4:46:44 PM (2 days ago) Feb 18
to vim...@googlegroups.com
patch 9.2.0022: bt_quickfix() is slow

Commit: https://github.com/vim/vim/commit/f06b3f529a9ab7b9f228358b7b3bae27193ba85d
Author: zeertzjq <zeer...@outlook.com>
Date: Wed Feb 18 21:42:25 2026 +0000

patch 9.2.0022: bt_quickfix() is slow

Problem: In order to prevent a use-after-free, bt_quickfix() added a
call to buf_valid(), which slows it down, because Vim has to
loop through many buffers all the time (v9.0.1859)
Solution: Patch v9.0.2010 fixed a similar problem, so that the call to
buf_valid() is no longer required (zeertzjq)

fixes: #19169
closes: #19183

Signed-off-by: zeertzjq <zeer...@outlook.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/buffer.c b/src/buffer.c
index 8a5d883e7..5a639fcf5 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5951,7 +5951,7 @@ bt_normal(buf_T *buf)
bt_quickfix(buf_T *buf UNUSED)
{
#ifdef FEAT_QUICKFIX
- return buf != NULL && buf_valid(buf) && buf->b_p_bt[0] == 'q';
+ return buf != NULL && buf->b_p_bt[0] == 'q';
#else
return FALSE;
#endif
diff --git a/src/version.c b/src/version.c
index 53c825fd0..b6d79d2cd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 22,
/**/
21,
/**/
Reply all
Reply to author
Forward
0 new messages