Skip to content

Commit

Permalink
Clear regex flags for /m match text command option, issue #965.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jan 22, 2025
1 parent 0589943 commit cd377f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Notepad4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,11 @@ static void HandleMatchText(MatchTextFlag flag, LPCWSTR lpszText, bool jumpTo) n

if (flag & MatchTextFlag_Regex) {
efrData.fuFlags |= (iFindReplaceOption & FindReplaceOption_UseCxxRegex) ? (SCFIND_REGEXP | SCFIND_CXX11REGEX) : (SCFIND_REGEXP | SCFIND_POSIX);
} else if (flag & MatchTextFlag_TransformBS) {
efrData.option |= FindReplaceOption_TransformBackslash;
} else {
efrData.fuFlags &= SCFIND_REGEXP - 1; // clear all regex flags
if (flag & MatchTextFlag_TransformBS) {
efrData.option |= FindReplaceOption_TransformBackslash;
}
}

if (flag & MatchTextFlag_FindUp) {
Expand Down

0 comments on commit cd377f0

Please sign in to comment.