From 4682cb16b9aaaf8611bdbb187090d2f847c5300a Mon Sep 17 00:00:00 2001 From: Heiko Klare Date: Thu, 16 Jul 2026 12:55:38 +0200 Subject: [PATCH] Find/replace overlay: Read regex option from model instead button state The regex search button state is synchronized from the find/replace logic's option state via a listener, so decorate() reading the button's selection depends on that synchronization having happened. Reading the option directly from the logic removes this hidden ordering dependency and is consistent with how the other consumers (e.g., content assist availability) already query the model. Co-Authored-By: Claude Sonnet 5 --- .../ui/internal/findandreplace/overlay/FindReplaceOverlay.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java index efb18ffe6da..d01bc29e2dc 100644 --- a/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java +++ b/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java @@ -1039,7 +1039,7 @@ private void updateContentAssistAvailability() { } private void decorate() { - if (regexSearchButton.getSelection()) { + if (findReplaceLogic.isAvailableAndActive(SearchOptions.REGEX)) { SearchDecoration.validateRegex(getFindString(), searchBarDecoration); } else { searchBarDecoration.hide();