Repository navigation
fix(model): hold an undo pressed while the copy is brought up to date - #173
Merged
Merged
Conversation
…do empties the redo stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes for a person
An Undo or Redo pressed while the library is catching up, as after an item is moved, is no longer refused and lost. MAPP holds it and makes it once, when the library is whole again.
What I chose
hydrationIncomplete,copyExpired) is the one source of truth for when a write cannot be made yet.ItemSource.submit(_:as:undoing:)). The engine holds a marked write that the package refuses that way and releases it after a read that found the copy whole. Each write is rebased on the item's current version, and judged first on whether its item, or a link's ends and type, are as they were when Undo was pressed.Limits
Tests
EditorTests/selectingAnotherItemReturnsTheBodyToReadingneeded a key window that the background-only host cannot give (it failed alone on main too). It now checks the editor's own focus state with no panels. The key-window checks were its only window behaviour and are removed.