diff options
author | ZyX <kp-pav@yandex.ru> | 2015-08-15 14:33:00 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-08 22:00:43 +0300 |
commit | 369081d1c4ccd81c23fa09286f14637ae8136b8e (patch) | |
tree | d61d211e7f509efbcb651c824e4088dea84633e1 /test/functional/helpers.lua | |
parent | 0960e169086e5f2d63fa24053e7c1c06e7abc912 (diff) | |
download | rneovim-369081d1c4ccd81c23fa09286f14637ae8136b8e.tar.gz rneovim-369081d1c4ccd81c23fa09286f14637ae8136b8e.tar.bz2 rneovim-369081d1c4ccd81c23fa09286f14637ae8136b8e.zip |
shada: Fix crash in hmll_insert
This problem made test64 to crash. Description of the bug: when removing entry
from history when removed entry is not the last one it puts one element to
free_entries list, but ignores free entries starting from last_free_element.
Possible solutions:
1. First working: simply populate free_entries list with entries which are still
free, starting from last_free_element.
2. Better (wastes less CPU): after free_entries list size goes to zero (which is
the initial value) continue using last_free_element.
3. Even better (less memory): note that element from the list is *only* removed
before adding another one. So replace free_entries array with one item.
Also renamed last_free_element to last_free_entry: in any case most of the lines
which mention it were altered.
Diffstat (limited to 'test/functional/helpers.lua')
0 files changed, 0 insertions, 0 deletions