I've managed to make the changes in replacedlg.cpp.
In some files, replacing works, but in others, it doesn't. I've realized it's a line-endings issue. The wxTextCtrl interprets a line feed as LF, while the files can vary their endings in LF, CR or CRLF.
To solve this, I need to make the following steps:
If the search string does NOT contains a CR or LF, search normally.
If it does,
1) Get the EOL mode from C::B.
2) Convert the "find" string to this EOL mode.
3) Convert the file to be searched (the in-memory buffer, i mean) to this EOL mode so line endings are consistent. We're going to replace in files, anyway.
4) Convert the "replace" string to this EOL mode.
5) Find and replace the string as we'd do with any other strings.
This should be done in EditorManager::Replace(cbStyledTextCtrl* control, cbFindReplaceData* data).
I'll keep posting my progress.
BTW, regex search hasn't been tested yet. Wish me luck!