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 (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@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

Reply via email to