Skip to content

fix: color triggers now work inside 'only pass matches' trigger groups#9442

Open
vadi2 wants to merge 1 commit into
Mudlet:developmentfrom
vadi2:fix-8198-filter-color-child
Open

fix: color triggers now work inside 'only pass matches' trigger groups#9442
vadi2 wants to merge 1 commit into
Mudlet:developmentfrom
vadi2:fix-8198-filter-color-child

Conversation

@vadi2

@vadi2 vadi2 commented Jul 14, 2026

Copy link
Copy Markdown
Member

Brief overview of PR changes/additions

  • A color-pattern trigger nested under an "only pass matches" (filter) parent could never fire: the filter ran children with no buffer line to read colors from
  • The real line number is now passed through, and the color scan is limited to the parent's matched text so filter semantics hold; top-level color triggers behave exactly as before

Motivation for adding to Mudlet

Filter chains are the standard way to scope triggers, and color patterns silently did nothing inside them.

Other info (issues closed, discussion etc)

Fixes #8198
Known limitation: children of multiline filter parents still can't use color patterns (a multiline match spans several lines, so no single line applies).

Test case: create a perl-regex trigger ^(hello world)$ with "only pass matches" ticked, nest a color trigger (foreground ANSI yellow) under it with echo("CHILD FIRED\n"), then lua feedTriggers("\27[33mhello world\27[0m\n") - the child fires. Covered by the new ColorTriggerFilterChildTest (ctest).

trimmed.mp4

Assisted-by: Claude:claude-fable-5
Signed-off-by: Vadim Peretokin <vadim.peretokin@mudlet.org>
@vadi2
vadi2 requested a review from a team as a code owner July 14, 2026 09:43
@add-deployment-links

add-deployment-links Bot commented Jul 14, 2026

Copy link
Copy Markdown

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Fix: color trigger under a filter parent..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Colour Triggers in only pass matches subtriggers.

1 participant