xC: hackfix Readline 8.3
This commit is contained in:
5
xC.c
5
xC.c
@@ -653,10 +653,15 @@ input_rl_buffer_destroy (void *input, input_buffer_t input_buffer)
|
|||||||
HISTORY_STATE *state = history_get_history_state ();
|
HISTORY_STATE *state = history_get_history_state ();
|
||||||
|
|
||||||
history_set_history_state (buffer->history);
|
history_set_history_state (buffer->history);
|
||||||
|
|
||||||
|
// TODO: Actually figure out why these cause crashes later.
|
||||||
|
#if RL_READLINE_VERSION <= 0x0802
|
||||||
rl_clear_history ();
|
rl_clear_history ();
|
||||||
// rl_clear_history just removes history entries,
|
// rl_clear_history just removes history entries,
|
||||||
// we have to reclaim memory for their actual container ourselves
|
// we have to reclaim memory for their actual container ourselves
|
||||||
free (buffer->history->entries);
|
free (buffer->history->entries);
|
||||||
|
#endif
|
||||||
|
|
||||||
free (buffer->history);
|
free (buffer->history);
|
||||||
buffer->history = NULL;
|
buffer->history = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user