Is it possible to override or define the code executed when a menu item is selected from this default pop menu (such as "Undo")?
I tried to use tomitomy's class: https://forum.lazarus.freepascal.org/index.php/topic,38714.0.html; but I had some difficulties with that. And being a guy who likes to use his own code in his projects, I tried to develop a simpler Undo / Redo class for TMemo. I think it can be adapted for other controls too. And it works well in Windows and Linux (beware of the bug https://bugs.freepascal.org/view.php?id=32669).I am sharing it in the attached ZIP file. Any comments are welcome. And of course, if you find it useful you can use it in your own projects.