From 73a6000120e64c534eb3545952422c4dc17972fe Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 17 Dec 2022 08:47:30 +0800 Subject: vim-patch:8.2.1209: Vim9: test failure Problem: Vim9: test failure. Solution: Add missing changes to hashtab. https://github.com/vim/vim/commit/21c16f868d725fffc8fa36620cba33dd5f2ed576 Co-authored-by: Bram Moolenaar --- src/nvim/hashtab.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/hashtab.c b/src/nvim/hashtab.c index 31dc6f5bd4..fdbfdd7d77 100644 --- a/src/nvim/hashtab.c +++ b/src/nvim/hashtab.c @@ -223,6 +223,7 @@ int hash_add(hashtab_T *ht, char *key) void hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash) { ht->ht_used++; + ht->ht_changed++; if (hi->hi_key == NULL) { ht->ht_filled++; } @@ -242,6 +243,7 @@ void hash_add_item(hashtab_T *ht, hashitem_T *hi, char_u *key, hash_T hash) void hash_remove(hashtab_T *ht, hashitem_T *hi) { ht->ht_used--; + ht->ht_changed++; hi->hi_key = HI_KEY_REMOVED; hash_may_resize(ht, 0); } @@ -384,6 +386,7 @@ static void hash_may_resize(hashtab_T *ht, size_t minitems) ht->ht_array = newarray; ht->ht_mask = newmask; ht->ht_filled = ht->ht_used; + ht->ht_changed++; } #define HASH_CYCLE_BODY(hash, p) \ -- cgit