mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #15668 from bfredl/logmenu
fix(tests): don't attempt to call ui functions in free_all_mem()
This commit is contained in:
commit
0c66289cba
@ -69,9 +69,16 @@ static int pending_has_mouse = -1;
|
|||||||
#else
|
#else
|
||||||
static size_t uilog_seen = 0;
|
static size_t uilog_seen = 0;
|
||||||
static char uilog_last_event[1024] = { 0 };
|
static char uilog_last_event[1024] = { 0 };
|
||||||
|
|
||||||
|
#ifndef EXITFREE
|
||||||
|
#define entered_free_all_mem false
|
||||||
|
#endif
|
||||||
|
|
||||||
# define UI_LOG(funname) \
|
# define UI_LOG(funname) \
|
||||||
do { \
|
do { \
|
||||||
if (strequal(uilog_last_event, STR(funname))) { \
|
if (entered_free_all_mem) { \
|
||||||
|
/* do nothing, we cannot log now */ \
|
||||||
|
} else if (strequal(uilog_last_event, STR(funname))) { \
|
||||||
uilog_seen++; \
|
uilog_seen++; \
|
||||||
} else { \
|
} else { \
|
||||||
if (uilog_seen > 0) { \
|
if (uilog_seen > 0) { \
|
||||||
@ -107,6 +114,10 @@ static char uilog_last_event[1024] = { 0 };
|
|||||||
# include "ui_events_call.generated.h"
|
# include "ui_events_call.generated.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef EXITFREE
|
||||||
|
#undef entered_free_all_mem
|
||||||
|
#endif
|
||||||
|
|
||||||
void ui_init(void)
|
void ui_init(void)
|
||||||
{
|
{
|
||||||
default_grid.handle = 1;
|
default_grid.handle = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user