[Lazarus] SynEdit1.SearchReplace(
Martin Frb
lazarus at mfriebe.de
Mon May 26 17:55:47 CEST 2014
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 (frDown in 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 at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list