Skip to content

Commit 3f3daf7

Browse files
HeikoKlareclaude
andcommitted
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 <noreply@anthropic.com>
1 parent e642f04 commit 3f3daf7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ private void updateContentAssistAvailability() {
10391039
}
10401040

10411041
private void decorate() {
1042-
if (regexSearchButton.getSelection()) {
1042+
if (findReplaceLogic.isAvailableAndActive(SearchOptions.REGEX)) {
10431043
SearchDecoration.validateRegex(getFindString(), searchBarDecoration);
10441044
} else {
10451045
searchBarDecoration.hide();

0 commit comments

Comments
 (0)