Skip to content

Commit

Permalink
fix "Include binary files" and "Add to Presets" will not be enabled
Browse files Browse the repository at this point in the history
`IDC_SEARCHTEXT` content change relies on `CheckRegex()` to return the
length of search text to decide whether enable them.
follow-up to 0870d53
  • Loading branch information
lifenjoiner committed Feb 5, 2024
1 parent 373655e commit d7cdced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SearchDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4187,6 +4187,7 @@ int CSearchDlg::CheckRegex()

auto buf = GetDlgItemText(IDC_SEARCHTEXT);
int len = static_cast<int>(wcslen(buf.get()));
int lenSearchText = len;
if (IsDlgButtonChecked(*this, IDC_REGEXRADIO) == BST_CHECKED)
{
// check if the regex is valid
Expand Down Expand Up @@ -4281,7 +4282,7 @@ int CSearchDlg::CheckRegex()
}
RedrawWindow(GetDlgItem(*this, IDC_PATTERN), nullptr, nullptr, RDW_FRAME | RDW_INVALIDATE);

return len;
return lenSearchText;
}

void CSearchDlg::AutoSizeAllColumns()
Expand Down

0 comments on commit d7cdced

Please sign in to comment.