diff --git a/jadx-gui/src/main/java/jadx/gui/ui/dialog/CommonSearchDialog.java b/jadx-gui/src/main/java/jadx/gui/ui/dialog/CommonSearchDialog.java index bf884aaebd4..2ebcedf59e9 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/dialog/CommonSearchDialog.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/dialog/CommonSearchDialog.java @@ -112,10 +112,11 @@ private void updateTitle(String searchText) { } } - public void updateHighlightContext(String text, boolean caseSensitive, boolean regexp) { + public void updateHighlightContext(String text, boolean caseSensitive, boolean regexp, boolean wholeWord) { updateTitle(text); highlightContext = new SearchContext(text); highlightContext.setMatchCase(caseSensitive); + highlightContext.setWholeWord(wholeWord); highlightContext.setRegularExpression(regexp); highlightContext.setMarkAll(true); } diff --git a/jadx-gui/src/main/java/jadx/gui/ui/dialog/SearchDialog.java b/jadx-gui/src/main/java/jadx/gui/ui/dialog/SearchDialog.java index dd78b2edc6b..4550176b91a 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/dialog/SearchDialog.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/dialog/SearchDialog.java @@ -595,7 +595,7 @@ private void updateTable() { private void updateTableHighlight() { String text = searchField.getText(); - updateHighlightContext(text, !options.contains(IGNORE_CASE), options.contains(USE_REGEX)); + updateHighlightContext(text, !options.contains(IGNORE_CASE), options.contains(USE_REGEX), false); cache.setLastSearch(text); cache.getLastSearchOptions().put(searchPreset, options); if (!mainWindow.getSettings().isUseAutoSearch()) { diff --git a/jadx-gui/src/main/java/jadx/gui/ui/dialog/UsageDialog.java b/jadx-gui/src/main/java/jadx/gui/ui/dialog/UsageDialog.java index 084583df7c2..7ccf1481019 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/dialog/UsageDialog.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/dialog/UsageDialog.java @@ -160,7 +160,7 @@ protected void loadFinished() { Collections.sort(usageList); resultsModel.addAll(usageList); - updateHighlightContext(node.getName(), true, false); + updateHighlightContext(node.getName(), true, false, true); resultsTable.initColumnWidth(); resultsTable.updateTable(); updateProgressLabel(true);