Andre Poenitz wrote:
On Mon, Mar 26, 2007 at 05:55:13PM +0200, Abdelrazak Younes wrote:
3189    Backspace in Mathed results in crash

I tried hard to fix that one but failed. Andre, could you please have a look?

This patch fixes the crash. If the currently entered macro consists of only a backslash when pressing backspace then this patch removes it silently without creating a change tracking entry. AFAICS this behavior is similar to pressing e.g. the right arrow in this situation.

I don't get a crash but
"wrong pos 1, max is 0 at level 2. Trying to correct this.
correcting cursor to level 1"


This warning still remains with that patch

Bernhard
Index: src/mathed/InsetMathNest.C
===================================================================
--- src/mathed/InsetMathNest.C  (revision 17575)
+++ src/mathed/InsetMathNest.C  (working copy)
@@ -659,6 +659,10 @@
 
        case LFUN_WORD_DELETE_BACKWARD:
        case LFUN_CHAR_DELETE_BACKWARD:
+               if (cur.inMacroMode() && cur.activeMacro()->name() == "\\") {
+                       cur.macroModeClose();
+                       break;
+               }
                if (cur.pos() == 0)
                        // May affect external cell:
                        recordUndoInset(cur, Undo::ATOMIC);

Reply via email to