Skip to content

Commit 4802f26

Browse files
the-mikedavisarchseer
authored andcommitted
Add a test case for undo/redo across splits
1 parent 9387dfa commit 4802f26

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

helix-term/tests/test/splits.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,15 @@ async fn test_changes_in_splits_apply_to_all_views() -> anyhow::Result<()> {
151151
// was not updated and after the `kd` step, pointed outside of the document.
152152
test(("#[|]#", "<C-w>v[<space><C-s><C-w>wkd<C-w>qd", "#[|]#")).await?;
153153

154+
// Transactions are applied to the views for windows lazily when they are focused.
155+
// This case panics if the transactions and inversions are not applied in the
156+
// correct order as we switch between windows.
157+
test((
158+
"#[|]#",
159+
"[<space>[<space>[<space><C-w>vuuu<C-w>wUUU<C-w>quuu",
160+
"#[|]#",
161+
))
162+
.await?;
163+
154164
Ok(())
155165
}

0 commit comments

Comments
 (0)