Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transaction application on undo/redo/earlier/later #4865

Merged

Commits on Nov 23, 2022

  1. Add test case that panics on undo

    This case panics since undo/redo call View::apply and here, the edit
    that moves the jumplist selection out-of-bounds is not yet applied when
    View::apply is called in undo/redo. View::apply should only be called
    by the EditorView now.
    the-mikedavis committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    2110455 View commit details
    Browse the repository at this point in the history
  2. Don't apply transactions to Views in undo/redo

    View::apply should only be called by EditorView after
    42e37a5. This change removes the
    duplicate calls within undo/redo which could cause a panic.
    the-mikedavis committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    8e62264 View commit details
    Browse the repository at this point in the history
  3. Apply inversions to Views on undo/redo

    When using undo/redo, the history revision can be decremented. In that
    case we should apply the inversions since the given revision in
    History::changes_since. This prevents panics with jumplist operations
    when a session uses undo/redo to move the jumplist selection outside
    of the document.
    the-mikedavis committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    2c83569 View commit details
    Browse the repository at this point in the history
  4. Follow parent links when calculating changes since a revision

    The 'revisions' field on History can't be treated as linear: each
    Revision in the revisions Vec has a parent link and an optional child
    link. We can follow those to unroll the recent history.
    the-mikedavis committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    a617261 View commit details
    Browse the repository at this point in the history