Fix "Remove Consecutive Duplicate Lines" not working on old Macintosh EOL

Close #5467
pull/5472/head
Don HO 6 years ago
parent 0467b7d6cd
commit a7d2b6ea6e
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

@ -1408,13 +1408,13 @@ void Notepad_plus::removeDuplicateLines()
// whichPart : line head or line tail
FindOption env;
env._str2Search = TEXT("^(.*\\r?\\n)(\\1)+");
env._str2Search = TEXT("^(.*(\\r?\\n|\\r))(\\1)+");
env._str4Replace = TEXT("\\1");
env._searchType = FindRegex;
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
// remove the last line if it's a duplicate line.
env._str2Search = TEXT("^(.+)\\r?\\n(\\1)$");
env._str2Search = TEXT("^(.+)(\\r?\\n|\\r)(\\1)$");
env._str4Replace = TEXT("\\1");
env._searchType = FindRegex;
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);

Loading…
Cancel
Save