aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-17 08:47:30 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-12-17 08:58:50 +0800
commit73a6000120e64c534eb3545952422c4dc17972fe (patch)
tree1fc60f5e76428f2f46ef1374336960715459d345
parentd302c0e35ed2173fd912b1d942d93b98310dec8f (diff)
downloadrneovim-73a6000120e64c534eb3545952422c4dc17972fe.tar.gz
rneovim-73a6000120e64c534eb3545952422c4dc17972fe.tar.bz2
rneovim-73a6000120e64c534eb3545952422c4dc17972fe.zip
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 <Bram@vim.org>
-rw-r--r--src/nvim/hashtab.c3
1 files changed, 3 insertions, 0 deletions
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) \