diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index 90db8c77..106e3ddc 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -4966,7 +4966,7 @@ rd_view_ui(Rng2F32 rect) txt_pt_match(cell_edit_state->cursor, cell_edit_state->mark)) { String8 input = str8(cell_edit_state->input_buffer, cell_edit_state->input_size); - rd_set_autocomp_regs(cell->eval, .ui_key = line_edit_key, .string = input); + rd_set_autocomp_regs(cell->eval, .ui_key = line_edit_key, .string = input, .cursor = cell_edit_state->cursor); } } } @@ -6670,7 +6670,7 @@ rd_window_frame(void) rd_cfg_child_from_string_or_alloc(view, str8_lit("autocomplete")); RD_Cfg *query = rd_cfg_child_from_string_or_alloc(view, str8_lit("query")); RD_Cfg *input = rd_cfg_child_from_string_or_alloc(query, str8_lit("input")); - rd_cfg_new_replace(input, ws->autocomp_regs->string); + rd_cfg_new_replace(input, ws->autocomp_cursor_info.filter); RD_Cfg *expr = rd_cfg_child_from_string_or_alloc(view, str8_lit("expression")); rd_cfg_new_replace(expr, ws->autocomp_cursor_info.list_expr); @@ -7136,7 +7136,7 @@ rd_window_frame(void) } if(has_autocomplete_hint && has_accept_operation) { - autocomp_floating_view_task->signal.box->transparency = 1; + autocomp_floating_view_task->signal.box->fixed_position = v2f32(10000, 10000); } } @@ -15238,7 +15238,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; - evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; + evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional|UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Char; evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); @@ -15249,7 +15249,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; - evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; + evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional|UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Char; evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); @@ -15282,7 +15282,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; - evt.flags = UI_EventFlag_ExplicitDirectional; + evt.flags = UI_EventFlag_ExplicitDirectional|UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Word; evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); @@ -15293,7 +15293,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; - evt.flags = UI_EventFlag_ExplicitDirectional; + evt.flags = UI_EventFlag_ExplicitDirectional|UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Word; evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); @@ -15304,6 +15304,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; + evt.flags = UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Page; evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); @@ -15314,6 +15315,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; + evt.flags = UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Page; evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); @@ -15324,6 +15326,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; + evt.flags = UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Whole; evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); @@ -15334,6 +15337,7 @@ rd_frame(void) RD_WindowState *ws = rd_window_state_from_cfg(window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; + evt.flags = UI_EventFlag_Secondary; evt.delta_unit = UI_EventDeltaUnit_Whole; evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index 2a289b3b..0dba338e 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -196,6 +196,7 @@ // [ ] "pop out" (hitting enter on visualizers should open them as tabs) // [ ] we probably want to disable pop/pull out for transient things, e.g. theme color cfgs // [ ] finish theme editing, build themes - replace code colors map with new theme stuff +// // [ ] maybe add extra caching layer to process memory querying? we pay a pretty // heavy cost even to just read 8 bytes... // [ ] odin's demo is busted - need to revert PDB conversion type index changes. diff --git a/src/raddbg/raddbg_views.c b/src/raddbg/raddbg_views.c index 09a47389..86b989ba 100644 --- a/src/raddbg/raddbg_views.c +++ b/src/raddbg/raddbg_views.c @@ -1415,10 +1415,29 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row) #undef take_pct } + //////////////////////////// + //- rjf: @watch_row_build_cells error rows + // + else if(row->eval.irtree.mode == E_Mode_Null && row->eval.msgs.max_kind > E_MsgKind_Null) + { + info.cell_style_key = str8_lit("expr_and_error"); + RD_Cfg *view = rd_cfg_from_id(rd_regs()->view); + RD_Cfg *style = rd_cfg_child_from_string(view, info.cell_style_key); + RD_Cfg *w_cfg = style->first; + F32 next_pct = 0; +#define take_pct() (next_pct = (F32)f64_from_str8(w_cfg->string), w_cfg = w_cfg->next, next_pct) + rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, row->eval, + .flags = RD_WatchCellFlag_Expr|RD_WatchCellFlag_NoEval|RD_WatchCellFlag_Indented, + .default_pct = 0.60f, + .pct = take_pct()); + rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, row->eval, .default_pct = 0.40f, .pct = take_pct()); +#undef take_pct + } + //////////////////////////// //- rjf: @watch_row_build_cells root-level type rows // - else if(row->eval.irtree.mode == E_Mode_Null && (e_type_key_match(row->block->eval.irtree.type_key, e_type_key_zero()) || row->block->eval.irtree.mode != E_Mode_Null)) + else if(row->eval.irtree.mode == E_Mode_Null && (row->block->eval.irtree.mode != E_Mode_Null || row->block->parent == &ev_nil_block)) { info.cell_style_key = str8_lit("root_type"); RD_Cfg *view = rd_cfg_from_id(rd_regs()->view);