]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0022: bt_quickfix() is slow v9.2.0022
authorzeertzjq <zeertzjq@outlook.com>
Wed, 18 Feb 2026 21:42:25 +0000 (21:42 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 18 Feb 2026 21:42:25 +0000 (21:42 +0000)
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 <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/buffer.c
src/version.c

index 8a5d883e787670df9e1ea56d6eaef6a1f9e600e4..5a639fcf58e86f6c28580ce4d6b2d73b20fd7bc0 100644 (file)
@@ -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
index 53c825fd0e2482fdd85e42efc88a5e4015d7548d..b6d79d2cd9de5b3b3c103b0120ad9caed4df40e4 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    22,
 /**/
     21,
 /**/