mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 21:08:40 +00:00
do not apply filters past one block layer (fixes broken expansions in debug info table tabs)
This commit is contained in:
@@ -1154,7 +1154,29 @@ E_TYPE_ACCESS_FUNCTION_DEF(watches)
|
||||
|
||||
E_TYPE_EXPAND_INFO_FUNCTION_DEF(watches)
|
||||
{
|
||||
RD_WatchesAccel *accel = (RD_WatchesAccel *)eval.irtree.user_data;
|
||||
RD_WatchesAccel *ext = (RD_WatchesAccel *)eval.irtree.user_data;
|
||||
RD_WatchesAccel *accel = push_array(arena, RD_WatchesAccel, 1);
|
||||
{
|
||||
RD_CfgArray cfgs__filtered = ext->cfgs;
|
||||
if(filter.size != 0)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
RD_CfgList cfgs_list__filtered = {0};
|
||||
for EachIndex(idx, ext->cfgs.count)
|
||||
{
|
||||
RD_Cfg *watch = ext->cfgs.v[idx];
|
||||
String8 string = watch->first->string;
|
||||
FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, string);
|
||||
if(matches.count == matches.needle_part_count)
|
||||
{
|
||||
rd_cfg_list_push(scratch.arena, &cfgs_list__filtered, watch);
|
||||
}
|
||||
}
|
||||
cfgs__filtered = rd_cfg_array_from_list(arena, &cfgs_list__filtered);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
accel->cfgs = cfgs__filtered;
|
||||
}
|
||||
E_TypeExpandInfo result = {accel, accel->cfgs.count + 1};
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user