Jean-Marc Lasgouttes wrote:
> The question is to know why undo fails...

Here we have a separate problem indeed. Undo is not recorded for special 
chars. You can crash LyX by:

- enter math inset
- type "x"
- leave math inset with arrow key
- hit C+- (hyphenation point)
- undo

Fixed by the attached patch. OK?

Jürgen
Index: src/Text3.cpp
===================================================================
--- src/Text3.cpp	(Revision 18371)
+++ src/Text3.cpp	(Arbeitskopie)
@@ -244,6 +244,7 @@
 
 void specialChar(Cursor & cur, InsetSpecialChar::Kind kind)
 {
+	recordUndo(cur);
 	cap::replaceSelection(cur);
 	cur.insert(new InsetSpecialChar(kind));
 	cur.posRight();

Reply via email to