patch 9.1.0797: testing of options can be further improved

Problem:  testing of options can be further improved
Solution: split the generated option test into test_options_all.vim,
          add more test cases, save and restore values, fix use-after-free

closes: #15894

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Milly
2024-10-21 22:20:51 +02:00
committed by Christian Brabandt
parent bfe568d8c4
commit 6eca04e9f1
9 changed files with 193 additions and 74 deletions

View File

@ -1694,7 +1694,11 @@ getout(int exitval)
}
#ifdef FEAT_VIMINFO
if (*p_viminfo != NUL)
if (
# ifdef EXITFREE
entered_free_all_mem == FALSE &&
# endif
*p_viminfo != NUL)
// Write out the registers, history, marks etc, to the viminfo file
write_viminfo(NULL, FALSE);
#endif