This commit is contained in:
James McCoy 2017-01-02 07:18:18 -05:00
parent f7639e2490
commit af2b5abcd6
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB
3 changed files with 9 additions and 8 deletions

View File

@ -21570,7 +21570,7 @@ void func_unref(char_u *name)
fp = find_func(name);
if (fp == NULL) {
#ifdef EXITFREE
if (!entered_free_all_mem)
if (!entered_free_all_mem) // NOLINT(readability/braces)
#endif
EMSG2(_(e_intern2), "func_unref()");
} else {

View File

@ -640,10 +640,10 @@ EXTERN int exiting INIT(= FALSE);
// true when in or after free_all_mem()
EXTERN bool entered_free_all_mem INIT(= false);
#endif
/* volatile because it is used in signal handler deathtrap(). */
EXTERN volatile int full_screen INIT(= FALSE);
/* TRUE when doing full-screen output
* otherwise only writing some messages */
// volatile because it is used in signal handler deathtrap().
EXTERN volatile int full_screen INIT(= false);
// TRUE when doing full-screen output
// otherwise only writing some messages
EXTERN int restricted INIT(= FALSE);
// TRUE when started in restricted mode (-Z)

View File

@ -489,10 +489,11 @@ void free_all_mem(void)
{
buf_T *buf, *nextbuf;
/* When we cause a crash here it is caught and Vim tries to exit cleanly.
* Don't try freeing everything again. */
if (entered_free_all_mem)
// When we cause a crash here it is caught and Vim tries to exit cleanly.
// Don't try freeing everything again.
if (entered_free_all_mem) {
return;
}
entered_free_all_mem = true;
// Don't want to trigger autocommands from here on.