fix retrying regex searches

dbus-notify
Zlatin Balevsky 2022-02-26 07:10:15 +00:00
parent 407d4645e7
commit 9282011dcf
No known key found for this signature in database
GPG Key ID: A72832072D525E41
3 changed files with 7 additions and 2 deletions

View File

@ -88,7 +88,9 @@ class MainFrameController {
performSearch(search, null) performSearch(search, null)
} }
void repeatSearch(String terms, Integer tab) { void repeatSearch(String terms, Integer tab, Boolean regex) {
if (regex)
terms = "/$terms/"
performSearch(terms, tab) performSearch(terms, tab)
} }
@ -145,6 +147,7 @@ class MainFrameController {
params["core"] = core params["core"] = core
params["settings"] = view.settings params["settings"] = view.settings
params["tab"] = tab params["tab"] = tab
params["regex"] = regexSearch
def group = mvcGroup.createMVCGroup("SearchTab", uuid.toString(), params) def group = mvcGroup.createMVCGroup("SearchTab", uuid.toString(), params)
model.results[uuid.toString()] = group model.results[uuid.toString()] = group

View File

@ -40,6 +40,7 @@ class SearchTabModel {
UISettings uiSettings UISettings uiSettings
String uuid String uuid
Integer tab Integer tab
Boolean regex
boolean visible boolean visible
private boolean dirty private boolean dirty

View File

@ -492,9 +492,10 @@ class SearchTabView {
def repeatSearch = { def repeatSearch = {
int tab = parent.indexOfComponent(pane) int tab = parent.indexOfComponent(pane)
Boolean regex = model.regex
def parentGroup = mvcGroup.parentGroup def parentGroup = mvcGroup.parentGroup
closeTab.call() closeTab.call()
parentGroup.controller.repeatSearch(searchTerms, tab) parentGroup.controller.repeatSearch(searchTerms, tab, regex)
} }
def showPopupMenu(MouseEvent e) { def showPopupMenu(MouseEvent e) {