aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test
diff options
context:
space:
mode:
authorMichael Davis2022-11-27 19:47:52 +0000
committerBlaž Hrastnik2022-11-29 16:15:20 +0000
commit4802f26a232b2eed5f4af05a540a4735edd199ee (patch)
tree2c5b9bf9563dec753112265f73370d198fff8b8d /helix-term/tests/test
parent9387dfafedfc7051e7682cfdbec09b5b91c76918 (diff)
Add a test case for undo/redo across splits
Diffstat (limited to 'helix-term/tests/test')
-rw-r--r--helix-term/tests/test/splits.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/helix-term/tests/test/splits.rs b/helix-term/tests/test/splits.rs
index a51de365..a34a24b7 100644
--- a/helix-term/tests/test/splits.rs
+++ b/helix-term/tests/test/splits.rs
@@ -151,5 +151,15 @@ async fn test_changes_in_splits_apply_to_all_views() -> anyhow::Result<()> {
// was not updated and after the `kd` step, pointed outside of the document.
test(("#[|]#", "<C-w>v[<space><C-s><C-w>wkd<C-w>qd", "#[|]#")).await?;
+ // Transactions are applied to the views for windows lazily when they are focused.
+ // This case panics if the transactions and inversions are not applied in the
+ // correct order as we switch between windows.
+ test((
+ "#[|]#",
+ "[<space>[<space>[<space><C-w>vuuu<C-w>wUUU<C-w>quuu",
+ "#[|]#",
+ ))
+ .await?;
+
Ok(())
}