fix view-embedded query pushing - needs to apply to view, not simply tabs; fix schema-expansion command filtering

This commit is contained in:
Ryan Fleury
2025-05-01 08:34:43 -07:00
parent ed4fe5e3d1
commit 2a1e19ad23
2 changed files with 12 additions and 3 deletions
+2 -2
View File
@@ -14314,10 +14314,10 @@ rd_frame(void)
rd_cfg_new_replace(expr, rd_regs()->expr);
}
// rjf: non-floating -> embed in tab parameter
// rjf: non-floating -> embed in view
else
{
view = rd_cfg_from_id(rd_regs()->tab);
view = rd_cfg_from_id(rd_regs()->view);
}
// rjf: determine if the target view is a lister (and thus already has a command)
+10 -1
View File
@@ -436,7 +436,16 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(schema)
MD_Node *tag = md_tag_from_string(schema, str8_lit("expand_commands"), 0);
for MD_EachNode(arg, tag->first)
{
str8_list_push(scratch.arena, &commands_list, arg->string);
RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(arg->string);
FuzzyMatchRangeList name_matches = fuzzy_match_find(scratch.arena, filter, rd_display_from_code_name(cmd_kind_info->string));
FuzzyMatchRangeList desc_matches = fuzzy_match_find(scratch.arena, filter, cmd_kind_info->description);
FuzzyMatchRangeList tags_matches = fuzzy_match_find(scratch.arena, filter, cmd_kind_info->search_tags);
if(name_matches.count == name_matches.needle_part_count ||
desc_matches.count == desc_matches.needle_part_count ||
tags_matches.count == tags_matches.needle_part_count)
{
str8_list_push(scratch.arena, &commands_list, arg->string);
}
}
}
commands = str8_array_from_list(arena, &commands_list);