parnoldx / nasc

Do maths like a normal person
http://parnoldx.github.io/nasc/
GNU General Public License v3.0
560 stars 37 forks source link

Answer reference does not survive delete/undo #180

Closed eater closed 3 years ago

eater commented 3 years ago

Describe the bug When there's a lineX reference to an answer, and you delete it and then undo the deletion, the reference becomes OBJ.

To Reproduce Steps to reproduce the behavior:

  1. Start with a blank sheet.
  2. Input 236 on line 1.
  3. Input line1 on line 2. The right column populates correctly with "236".
  4. Input 2000 on line 3.
  5. Hold the backspace key to delete the contents of lines 2 and 3.
  6. Hold Ctrl-z to undo the deletion.
  7. Observe that line 2 now contains [OBJ] rather than the reference to line 1.

Expected behavior A clear and concise description of what you expected to happen. After deleting and undoing, the state should be what it was before the deletion, including references to answers.

Screenshots

2021-09-10_11-42-55

Desktop (please complete the following information):

parnoldx commented 3 years ago

I changed it, so the information is not lost but the undo stack is getting messed up and I couldn't find a method to edit it. But for now it seems better then before.