mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-26 03:59:55 +00:00
Fix assertions in test for selection restoration after undo/redo
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
e38c1814d5
commit
06e241117c
1 changed files with 2 additions and 2 deletions
|
@ -3901,12 +3901,12 @@ mod tests {
|
|||
// Redo the first two transactions together.
|
||||
editor.redo(&Redo, cx);
|
||||
assert_eq!(editor.text(cx), "12cde6");
|
||||
assert_eq!(editor.selected_ranges(cx), vec![4..4]);
|
||||
assert_eq!(editor.selected_ranges(cx), vec![5..5]);
|
||||
|
||||
// Redo the last transaction on its own.
|
||||
editor.redo(&Redo, cx);
|
||||
assert_eq!(editor.text(cx), "ab2cde6");
|
||||
assert_eq!(editor.selected_ranges(cx), vec![5..5]);
|
||||
assert_eq!(editor.selected_ranges(cx), vec![6..6]);
|
||||
|
||||
// Test empty transactions.
|
||||
editor.start_transaction_at(now, cx);
|
||||
|
|
Loading…
Reference in a new issue