vim: Fix issues with r/R (#13623)

Release Notes:

- vim: Fix undo after repeated insert/replace mode (#13573)
- vim: Fix 'r' repeating too much (#13566)
This commit is contained in:
Conrad Irwin 2024-06-27 21:54:34 -06:00 committed by GitHub
parent 363ac6bc96
commit da03610555
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 96 additions and 60 deletions

View file

@ -499,4 +499,15 @@ mod test {
cx.simulate_shared_keystrokes(".").await;
cx.shared_state().await.assert_eq("ˇx hello\n");
}
#[gpui::test]
async fn test_undo_repeated_insert(cx: &mut gpui::TestAppContext) {
let mut cx = NeovimBackedTestContext::new(cx).await;
cx.set_shared_state("hellˇo").await;
cx.simulate_shared_keystrokes("3 a . escape").await;
cx.shared_state().await.assert_eq("hello..ˇ.");
cx.simulate_shared_keystrokes("u").await;
cx.shared_state().await.assert_eq("hellˇo");
}
}