Recently there was a thread about undo/redo function in TMemo. I didn't follow the discussion, maybe it can be useful for you:http://forum.lazarus.freepascal.org/index.php/topic,38714.msg263908.html#msg263908