on master help sign in
Add a test case for undo/redo across splits
commit4802f26a232b2eed5f4af05a540a4735edd199ee authorMichael Davis <mcarsondavis@gmail.com> dateSun 27 Nov 2022, 13:47 (4 years ago) parent9387dfa
1 file changed+10
helix-term/tests/test/splits.rs+10
helix-term/tests/test/splits.rs+10
@@ -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}