Skip to content

Commit

Permalink
Respect matchCase in replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
Snoozeds committed Sep 22, 2024
1 parent e5d9cad commit cad64f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UnrealLocresEditor/FindReplaceDialog.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private void ReplaceTextInRow(MainWindow.DataRow row, string searchText, string
{
if (ShouldReplaceInCell(row.Values[i], searchText, matchCase, matchWholeWord, matchCell))
{
row.Values[i] = row.Values[i].Replace(searchText, replaceText, StringComparison.OrdinalIgnoreCase);
row.Values[i] = row.Values[i].Replace(searchText, replaceText, matchCase ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase);
}
}
row.OnPropertyChanged(nameof(row.Values));
Expand Down Expand Up @@ -281,7 +281,7 @@ private async Task ReplaceTextInRowAsync(MainWindow.DataRow row, string searchTe
{
if (ShouldReplaceInCell(row.Values[i], searchText, matchCase, matchWholeWord, matchCell))
{
row.Values[i] = row.Values[i].Replace(searchText, replaceText, StringComparison.OrdinalIgnoreCase);
row.Values[i] = row.Values[i].Replace(searchText, replaceText, matchCase ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase);
}
}

Expand Down

0 comments on commit cad64f2

Please sign in to comment.