From 77aaf8786089be270964e2f79ca6b1e0cc98ede7 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Wed, 19 Nov 2025 10:57:25 +0100 Subject: xC: hackfix Readline 8.3 --- xC.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xC.c') diff --git a/xC.c b/xC.c index fb3cf99..d204ff1 100644 --- a/xC.c +++ b/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_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 just removes history entries, // we have to reclaim memory for their actual container ourselves free (buffer->history->entries); +#endif + free (buffer->history); buffer->history = NULL; -- cgit v1.2.3-70-g09d2