Skip to content

Commit

Permalink
update replaceAll
Browse files Browse the repository at this point in the history
  • Loading branch information
daddel80 committed Jan 12, 2025
1 parent 899c4e2 commit 5c9219b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/MultiReplacePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4149,16 +4149,14 @@ bool MultiReplace::replaceAll(const ReplaceItemData& itemData, int& findCount, i
return true;
}

bool isReplaceFirstEnabled = (IsDlgButtonChecked(_hSelf, IDC_REPLACE_FIRST_CHECKBOX) == BST_CHECKED);
int searchFlags = (itemData.wholeWord * SCFIND_WHOLEWORD) | (itemData.matchCase * SCFIND_MATCHCASE) | (itemData.regex * SCFIND_REGEXP);

std::string findTextUtf8 = convertAndExtend(itemData.findText, itemData.extended);
std::string replaceTextUtf8 = convertAndExtend(itemData.replaceText, itemData.extended);
int searchFlags = (itemData.wholeWord * SCFIND_WHOLEWORD) | (itemData.matchCase * SCFIND_MATCHCASE) | (itemData.regex * SCFIND_REGEXP);
SearchResult searchResult = performSearchForward(findTextUtf8, searchFlags, false, 0);

bool isReplaceFirstEnabled = (IsDlgButtonChecked(_hSelf, IDC_REPLACE_FIRST_CHECKBOX) == BST_CHECKED);
int previousLineIndex = -1;
int lineFindCount = 0;

SearchResult searchResult = performSearchForward(findTextUtf8, searchFlags, false, 0);
std::string replaceTextUtf8;

while (searchResult.pos >= 0)
{
Expand Down

0 comments on commit 5c9219b

Please sign in to comment.