-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, transactions were only applied to the currently focused view. This could lead to jumplist selections not being updated or panics if a jumplist selection pointed past the end of the document. This change moves the application of transactions to the Editor which can apply the transaction to the document and all views, ensuring that jumplist entries are updated even if a document is open in multiple windows. This complicates most callers of the removed `helix_view::apply_transaction` helper function. Previously, callers could take mutable borrows of the view and doc at the beginning of a function and then pass them to the helper. Now they must take immutable borrows or refresh the mutable borrows after calling `Editor::apply_transaction` to avoid taking multiple mutable borrows of Editor. A new macro `current_ids` has been added to support a new common case where we only care about the currently focused document's and view's IDs.
- Loading branch information
1 parent
89efb4f
commit 71235e8
Showing
11 changed files
with
323 additions
and
211 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.