Re: [Lazarus] SynEdit1.SearchReplace(
On 5/27/14, CML Christian Hartnick c...@postkammer.de wrote: Thanx Bart. I've registered to bug tracker, but the confirmation mail reached me while sleeping ;-) I hope it didn't wake you up ;-) Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] SynEdit1.SearchReplace(
Hi, this is my first post on this list. I'm a former Delphi programmer now using lazarus. I'm writing an html generator and using the synedit component. When I'm searching and/or replacing with the SynEdit1.SearchReplace() function, there is a strange behavior if the search string is #10 (to search a word at the beginning/end). The function selects not only the linefeed - it selects the whole line above, too. In case of an replacement the line will be deleted! procedure TfrmMain.ReplaceDialog1Replace(Sender: TObject); var srOptions: TSynSearchOptions; begin srOptions:=[ssoReplace,ssoPrompt]; if not (frDownin ReplaceDialog1.Options) then Include(srOptions,ssoBackwards); if (frMatchCase in ReplaceDialog1.Options) then Include(srOptions,ssoMatchCase); if (frWholeWord in ReplaceDialog1.Options) then Include(srOptions,ssoWholeWord); if (frReplaceAll in ReplaceDialog1.Options) then Include(srOptions,ssoReplaceAll); if (frEntireScope in ReplaceDialog1.Options) then Include(srOptions,ssoEntireScope); SynEdit1.SearchReplace(ReplaceDialog1.FindText,ReplaceDialog1.ReplaceText,srOptions); end; thanx Christian -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SynEdit1.SearchReplace(
Sorry for the quick add-on: In lazarus seems to be the same error too. (I think it is using the same component). Christian Am 26.05.2014 17:42, schrieb CML Christian Hartnick: Hi, this is my first post on this list. I'm a former Delphi programmer now using lazarus. I'm writing an html generator and using the synedit component. When I'm searching and/or replacing with the SynEdit1.SearchReplace() function, there is a strange behavior if the search string is #10 (to search a word at the beginning/end). The function selects not only the linefeed - it selects the whole line above, too. In case of an replacement the line will be deleted! procedure TfrmMain.ReplaceDialog1Replace(Sender: TObject); var srOptions: TSynSearchOptions; begin srOptions:=[ssoReplace,ssoPrompt]; if not (frDownin ReplaceDialog1.Options) then Include(srOptions,ssoBackwards); if (frMatchCase in ReplaceDialog1.Options) then Include(srOptions,ssoMatchCase); if (frWholeWord in ReplaceDialog1.Options) then Include(srOptions,ssoWholeWord); if (frReplaceAll in ReplaceDialog1.Options) then Include(srOptions,ssoReplaceAll); if (frEntireScope in ReplaceDialog1.Options) then Include(srOptions,ssoEntireScope); SynEdit1.SearchReplace(ReplaceDialog1.FindText,ReplaceDialog1.ReplaceText,srOptions); end; thanx Christian -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SynEdit1.SearchReplace(
can you open a bug report on this please? I will then look at it as soon as I have time. (I am currently a bit busy, so it may be a while) On 26/05/2014 16:42, CML Christian Hartnick wrote: Hi, this is my first post on this list. I'm a former Delphi programmer now using lazarus. I'm writing an html generator and using the synedit component. When I'm searching and/or replacing with the SynEdit1.SearchReplace() function, there is a strange behavior if the search string is #10 (to search a word at the beginning/end). The function selects not only the linefeed - it selects the whole line above, too. In case of an replacement the line will be deleted! procedure TfrmMain.ReplaceDialog1Replace(Sender: TObject); var srOptions: TSynSearchOptions; begin srOptions:=[ssoReplace,ssoPrompt]; if not (frDownin ReplaceDialog1.Options) then Include(srOptions,ssoBackwards); if (frMatchCase in ReplaceDialog1.Options) then Include(srOptions,ssoMatchCase); if (frWholeWord in ReplaceDialog1.Options) then Include(srOptions,ssoWholeWord); if (frReplaceAll in ReplaceDialog1.Options) then Include(srOptions,ssoReplaceAll); if (frEntireScope in ReplaceDialog1.Options) then Include(srOptions,ssoEntireScope); SynEdit1.SearchReplace(ReplaceDialog1.FindText,ReplaceDialog1.ReplaceText,srOptions); end; thanx Christian -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SynEdit1.SearchReplace(
Confirmed and filed bugreport (http://bugs.freepascal.org/view.php?id=26227), assigned it to Martin. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SynEdit1.SearchReplace(
Am 26.05.2014 21:51, schrieb Bart: Confirmed and filed bugreport (http://bugs.freepascal.org/view.php?id=26227), assigned it to Martin. Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus Thanx Bart. I've registered to bug tracker, but the confirmation mail reached me while sleeping ;-) Christian -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus