Skip to content

Undo/Redo don't work properly #36

Description

@Prelle

The undo and redo functions seem completely broken. Redo seems to either wipe out all changes since a file was open, or it acts as an undo if the last action made was to delete content. Undo will also wipe out all changes if the last action was a redo. Redo/Undo should simply walk back and forth through the undo queue and redo should never delete content unless the last undo action was to restore deleted content.

Test 1:

  • Open new file.
  • Type in a few lines of text.
  • Press CTRL-Y
    Expected result: Nothing happens.
    Actual result: The entire file is cleared. This cannot be undone.

Test 2:

  • Open new file.
  • Type in a few lines of text.
  • Delete a line of text.
  • Press CTRL-Y
    Expected result: Nothing happens.
    Actual result: The deleted line of text is restored.
  • Press CTRL-Z
    Expected result: The restored line of text should be re-deleted.
    Actual result: The entire file is cleared. This cannot be undone.

Test 3:

  • Open a new file.
  • Type in a few lines of text.
  • Delete a line of text.
  • Press CTRL-Z (the line of text is restored)
  • Press CTRL-Y
    Expected result: The restored line of text should be re-deleted.
    Actual result: The entire file is cleared. This cannot be undone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions