BeginUndoBlock and EndUndoBlock of SynEdit lazarus / 69-SynEdit ---------------------------------------------------------------------- Edson · 2013-10-11 18:42 Are these methods: BeginUndoBlock and EndUndoBlock enabled in SynEdit? If so, How do they work? ---------------------------------------------------------------------- Martin_fr · 2013-10-11 19:32 yes they are. Code: [Select]BeginUndoBlock; //call edit //call edit //... EndUndoBlock; All edits will be undone in a single undo. Without the undoblock, each edit requires one undo Please read: http://wiki.lazarus.freepascal.org/SynEdit#Change_text_from_code access to SynEdit.Lines never works with undo ---------------------------------------------------------------------- Edson · 2013-10-11 20:37 Thanks Martin, I haven't found information about these methods of SynEdit. The wiki is a little poor about SynEdit. In fact, I have started to complete the spanish version: http://wiki.freepascal.org/SynEdit/es ---------------------------------------------------------------------- Martin_fr · 2013-10-11 20:59 well yes, documenting synedit is still a big todo. but the methods should be self explaining. Use code navigation, and you will see the declaration. SynEdit.TextBetweenPoints[ Point(x,y), Point(x2,y2) ] := 'abc'; works like setting block-selection begin/end and then SelText := 'abc' x,y are "logical". see same wiki page