mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Fixed #688, related to "Replace All" always being case sensitive
Originally committed to SVN as r1952.
This commit is contained in:
parent
d40168007f
commit
c93d6d57b2
@ -477,12 +477,24 @@ void SearchReplaceEngine::ReplaceAll() {
|
|||||||
count += reps;
|
count += reps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normal replace
|
// Normal replace
|
||||||
else {
|
else {
|
||||||
if (Text->Contains(LookFor)) {
|
if (!Search.matchCase) {
|
||||||
count += Text->Replace(LookFor,ReplaceWith);
|
wxString Left, Right;
|
||||||
replaced = true;
|
int pos;
|
||||||
|
while(Text->Lower().Contains(LookFor.Lower())) {
|
||||||
|
pos = Text->Lower().Find(LookFor.Lower());
|
||||||
|
Left = pos ? Text->Left(pos) : _T("");
|
||||||
|
Right = Text->Mid(pos+LookFor.Len());
|
||||||
|
*Text = Left + ReplaceWith + Right;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(Text->Contains(LookFor)) {
|
||||||
|
count += Text->Replace(LookFor, ReplaceWith);
|
||||||
|
replaced = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user