patch 9.2.0146: dictionary lookups can be improved
Commit:
https://github.com/vim/vim/commit/97a75d835b5b8321b1055852b4870496bf6eba60
Author: Yasuhiro Matsumoto <
matt...@gmail.com>
Date: Thu Mar 12 19:26:01 2026 +0000
patch 9.2.0146: dictionary lookups can be improved
Problem: dictionary lookups can be improved
Solution: Replace the vim_strncpy() by mch_memmove() call.
(Yasuhiro Matsumoto).
closes: #19646
Signed-off-by: Yasuhiro Matsumoto <
matt...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/dict.c b/src/dict.c
index 2b3ef8897..aea40b338 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -668,7 +668,8 @@ dict_find(dict_T *d, char_u *key, int len)
else
{
// Avoid a malloc/free by using buf[].
- vim_strncpy(buf, key, len);
+ mch_memmove(buf, key, (size_t)len);
+ buf[len] = NUL;
akey = buf;
}
diff --git a/src/version.c b/src/version.c
index da639bb06..baf369ca1 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 */
+/**/
+ 146,
/**/
145,
/**/