mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 06:28:59 +02:00
fix(settings-hook): list-items --owned-by with --command-regex intersects
When both filters are given, an item must satisfy both: owned by the requested source AND matching the pattern. Before, the regex branch skipped every owned row, so the combination could never match. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
61edb13c98
commit
614e238a24
@@ -886,7 +886,11 @@ case "$ACTION" in
|
||||
if (!cmd) continue;
|
||||
const row = gsOwnedRow(cmd, event, entry.matcher || "");
|
||||
if (ownedBy && (!row || row.source !== ownedBy)) continue;
|
||||
if (re && (row || !re.test(cmd))) continue; // the regex only ever sees items no table row owns
|
||||
// Alone, the regex only ever sees items no table row owns (the
|
||||
// vendor-own probe). Combined with --owned-by it narrows THAT set:
|
||||
// filters intersect, a regex never widens a selection.
|
||||
if (re && !ownedBy && row) continue;
|
||||
if (re && !re.test(cmd)) continue;
|
||||
console.log(JSON.stringify(cmd));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user