TSynEdit.SearchReplace removes lines if FindText contains LineEnding
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
If the FindText parameter for TSynEdit.SearchReplace contains LineEnding, then the line above the found text gets removed.
Steps to reproduce:
Build and run attached sample app.
Click Replace button.
It does this:
srOptions:=[ssoReplace, ssoReplaceAll, ssoEntireScope ];
FindText := LineEnding + '11';
ReplaceText := LineEnding +'xx';
SynEdit1.SearchReplace(FindText,ReplaceText,srOptions);
SynEdit1.SetFocus;
Expected result:
aaaa
xx11
cccc
Observed result:
(blank line)
xx11
cccc
Additional information:
AFAICS TSynEditSearch.FindNextOne returns wrong starting position?
Mantis conversion info:
- Mantis ID: 26227
- OS: Window
- OS Build: Win7
- Build: r45077
- Platform: i386
- Version: 1.3 (SVN)
- Fixed in version: 1.5 (SVN)
- Fixed in revision: 47504 (#ea99a9bc)
- Target version: 1.4