Skip to content

Commit 176c259

Browse files
committed
ghosted 'view rule' hint
1 parent 5ce74bd commit 176c259

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/raddbg/raddbg_views.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,7 +2919,7 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
29192919
}
29202920

29212921
// rjf: build cell line edit
2922-
else RD_Font(cell_info.flags & RD_WatchCellFlag_IsNonCode ? RD_FontSlot_Main : RD_FontSlot_Code)
2922+
else
29232923
{
29242924
RD_LineEditParams line_edit_params = {0};
29252925
{
@@ -2942,7 +2942,19 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
29422942
line_edit_params.fstrs = cell_info.fstrs;
29432943
}
29442944
UI_TextAlignment(cell->px != 0 ? UI_TextAlign_Center : UI_TextAlign_Left)
2945-
sig = rd_line_editf(&line_edit_params, "%S###%I64x_row_%I64x", str8_zero(), cell_x, row_hash);
2945+
{
2946+
B32 is_non_code = !!(cell_info.flags & RD_WatchCellFlag_IsNonCode);
2947+
String8 ghost_text = {0};
2948+
if(cell->kind == RD_WatchCellKind_Tag && cell_info.string.size == 0 && global_row_idx == 0)
2949+
{
2950+
ghost_text = str8_lit("View Rules");
2951+
is_non_code = !ui_is_focus_active();
2952+
}
2953+
RD_Font(is_non_code ? RD_FontSlot_Main : RD_FontSlot_Code)
2954+
{
2955+
sig = rd_line_editf(&line_edit_params, "%S###%I64x_row_%I64x", ghost_text, cell_x, row_hash);
2956+
}
2957+
}
29462958
#if 0 // TODO(rjf): @cfg
29472959
if(ui_is_focus_active() &&
29482960
selection_tbl.min.x == selection_tbl.max.x && selection_tbl.min.y == selection_tbl.max.y &&

0 commit comments

Comments
 (0)