Backspacing an equation cannot be undone with ctrl-z

With the introduction of the live preview, after an equation has been written, and rendered in mathjax, if the cursor is immediately after the equation and I backspace, the whole equation gets removed. This is a slightly annoying feature imo, but I suppose I can see it as tenable for some.

What’s much worse is that undoing with ctrl-z immediately after having removed the equation this way doesn’t restore it. This can easily lead to loss of information. I ended up deleting by mistake a couple of long equations while trying to make simple edits to them and had to retype the whole thing from scratch.

I’d argue that either backspace shouldn’t remove the whole equation, but rather open the live editor again and remove a single character in the latex source, or alternatively doing ctrl-z should restore the whole equation if it was previously removed with backspace. Personally I’d go with the former approach, automatically turning on the live editor when doing backspace, but that aside, what’s more important is that any action is reversible with undo.

This is related to Can live preview of MathJax be tunred off in the card editor?.

1 Like

Added to MathJax deletion can not be undone · Issue #1941 · ankitects/anki · GitHub