adjust find-code-location path to account for many windows; always snap in obviously-correct cases (e.g. window has the source code focused), fall back to other rules, mask off extra snaps when snap destination is found by earlier passes.

This commit is contained in:
Ryan Fleury
2025-06-05 12:55:48 -07:00
parent 3e1bc21f95
commit a73cda80e7
4 changed files with 531 additions and 330 deletions
+2 -1
View File
@@ -435,7 +435,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[24] =
{str8_lit_comp("thread"), str8_lit_comp("x:{'label':code_string, 'id':u64, @no_expand 'active':bool, 'call_stack':query}")},
};
Rng1U64 rd_reg_slot_range_table[44] =
Rng1U64 rd_reg_slot_range_table[45] =
{
{0},
{OffsetOf(RD_Regs, machine), OffsetOf(RD_Regs, machine) + sizeof(CTRL_Handle)},
@@ -476,6 +476,7 @@ Rng1U64 rd_reg_slot_range_table[44] =
{OffsetOf(RD_Regs, do_implicit_root), OffsetOf(RD_Regs, do_implicit_root) + sizeof(B32)},
{OffsetOf(RD_Regs, do_lister), OffsetOf(RD_Regs, do_lister) + sizeof(B32)},
{OffsetOf(RD_Regs, do_big_rows), OffsetOf(RD_Regs, do_big_rows) + sizeof(B32)},
{OffsetOf(RD_Regs, all_windows), OffsetOf(RD_Regs, all_windows) + sizeof(B32)},
{OffsetOf(RD_Regs, dir2), OffsetOf(RD_Regs, dir2) + sizeof(Dir2)},
{OffsetOf(RD_Regs, string), OffsetOf(RD_Regs, string) + sizeof(String8)},
{OffsetOf(RD_Regs, cmd_name), OffsetOf(RD_Regs, cmd_name) + sizeof(String8)},
+4 -1
View File
@@ -47,6 +47,7 @@ RD_RegSlot_NoRichTooltip,
RD_RegSlot_DoImplicitRoot,
RD_RegSlot_DoLister,
RD_RegSlot_DoBigRows,
RD_RegSlot_AllWindows,
RD_RegSlot_Dir2,
RD_RegSlot_String,
RD_RegSlot_CmdName,
@@ -470,6 +471,7 @@ B32 no_rich_tooltip;
B32 do_implicit_root;
B32 do_lister;
B32 do_big_rows;
B32 all_windows;
Dir2 dir2;
String8 string;
String8 cmd_name;
@@ -564,6 +566,7 @@ Z(getting_started)\
.do_implicit_root = rd_regs()->do_implicit_root,\
.do_lister = rd_regs()->do_lister,\
.do_big_rows = rd_regs()->do_big_rows,\
.all_windows = rd_regs()->all_windows,\
.dir2 = rd_regs()->dir2,\
.string = rd_regs()->string,\
.cmd_name = rd_regs()->cmd_name,\
@@ -575,7 +578,7 @@ extern String8 rd_tab_fast_path_view_name_table[24];
extern String8 rd_tab_fast_path_query_name_table[24];
extern RD_VocabInfo rd_vocab_info_table[343];
extern RD_NameSchemaInfo rd_name_schema_info_table[24];
extern Rng1U64 rd_reg_slot_range_table[44];
extern Rng1U64 rd_reg_slot_range_table[45];
extern String8 rd_binding_version_remap_old_name_table[8];
extern String8 rd_binding_version_remap_new_name_table[8];
extern String8 rd_icon_kind_text_table[75];