From 43c1a5d68b3b5f13999ebdd21f772b885cc124a2 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 7 May 2025 16:00:06 -0700 Subject: [PATCH] oops, fix bad reset of autocompletion arena! --- src/raddbg/raddbg_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index 30b5a2e5..847c9f06 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -9787,6 +9787,8 @@ rd_set_autocomp_regs_(E_Eval dst_eval, RD_Regs *regs) RD_WindowState *ws = rd_window_state_from_cfg(window_cfg); if(ws->autocomp_last_frame_index < rd_state->frame_index) { + arena_clear(ws->autocomp_arena); + //- rjf: calculate information about the cursor: // * what list should we generate? // * what string in the input should we replace? @@ -9921,7 +9923,6 @@ rd_set_autocomp_regs_(E_Eval dst_eval, RD_Regs *regs) if(is_allowed) { ws->autocomp_last_frame_index = rd_state->frame_index; - arena_clear(ws->autocomp_arena); ws->autocomp_regs = rd_regs_copy(ws->autocomp_arena, regs); ws->autocomp_cursor_info = cursor_info; }