SynMemo crash after "Undo" lazarus / 31-LCL ---------------------------------------------------------------------- Bart · 2011-09-10 08:27 Hi, Lazarus 0.9.31 r32144 FPC 2.4.4 i386-win32-win32/win64 Anyone has the same problem? Drop a SynMemo on a form Leave all properties unchanged Build Run In Synmemo set cursor at end of last line Press Enter (once ore more) (A new line is created) Press Ctrl+Z The line is removed, but the cursor stays where it was. In the gutter the linenumbers get updated correctly. Press Enter again: the synmemo throws an exception "TApplication.HandleException Invalid stringlist index 2" Does not happen in the IDE source editor b.t.w. Bart ---------------------------------------------------------------------- Martin_fr · 2011-09-10 11:33 Fixed, it was TSynMemo only, TSynEdit worked fine BTW, something I have been wondering for a long time: What is everyones facination with TSynMemo? It's 99.9% identical with TSynEdit (except for the extra bug), it has only the folowing differenes - it may publish less properties that TSynEdit. Not sure, but it has it's own list what is published, and TSynEdit publishes everything, so TSynMemo is less or equal - it adds to wrapper function:   Clear and Append => thay are 100% equal to Lines.Clear and Lines.Append - and it adds CharIndexToRowCol and RowColToCharIndex The last 2 are the only things that actually have some functionality. Is really everyone using them? Is everyone treating their text as one long text (contains all the lines) and need to know the BytePos of a XY pos? Isn't it much easier to treat the text as individual lines? Actually I heard quite a few times people ask, how they do the reverse in TMemo, and here we are TSynEdit already dealing in XY, and everyone needs the BytPos.. I really do not understand it.... ---------------------------------------------------------------------- Bart · 2011-09-11 09:34 Quote from: Martin_fr on September 10, 2011, 01:33:11 pmFixed, it was TSynMemo only, TSynEdit worked fine OK. Good thing I asked before opening a new bugtracker item. Quote from: Martin_fr on September 10, 2011, 01:33:11 pmBTW, something I have been wondering for a long time: What is everyones fascination with TSynMemo? It's 99.9% identical with TSynEdit (except for the extra bug), it has only the folowing differenes .... I really do not know. It doesn't help that in the IDE SynMemo is the 4th entry on the SynEdit Tab and SynEdit is the last one (and comes after all the highlighters) ... In my case this is because I am re-creating (not merely porting) a Delphi app which used a SynMemo (for highlighting), and back then there were big differences between SynMemo and SynEdit and I ended up needing SynMemo. My TEditor class was derived from TSynMemo and ads just a few properties and overrides some methods. Based upon your comments I think I'll make it a TSynEdit derived class instead. Bart ---------------------------------------------------------------------- Martin_fr · 2011-09-11 12:36 Quote from: Bart on September 11, 2011, 11:34:04 amIt doesn't help that in the IDE SynMemo is the 4th entry on the SynEdit Tab and SynEdit is the last one (and comes after all the highlighters) ... Not in trunk... ---------------------------------------------------------------------- Bart · 2011-09-11 13:40 Quote from: Martin_fr on September 11, 2011, 02:36:53 pmQuote from: Bart on September 11, 2011, 11:34:04 amIt doesn't help that in the IDE SynMemo is the 4th entry on the SynEdit Tab and SynEdit is the last one (and comes after all the highlighters) ... Not in trunk... Well, I use r31810. I can see on another machine with r32144 that it is indeed now the first one. Bart