Fix vim panic when over-shooting with j
This commit is contained in:
parent
4331cb8058
commit
8de67fd9d9
3 changed files with 33 additions and 1 deletions
|
@ -575,6 +575,26 @@ async fn test_folds(cx: &mut gpui::TestAppContext) {
|
|||
.await;
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_folds_panic(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = NeovimBackedTestContext::new(cx).await;
|
||||
cx.set_neovim_option("foldmethod=manual").await;
|
||||
|
||||
cx.set_shared_state(indoc! { "
|
||||
fn boop() {
|
||||
ˇbarp()
|
||||
bazp()
|
||||
}
|
||||
"})
|
||||
.await;
|
||||
cx.simulate_shared_keystrokes(["shift-v", "j", "z", "f"])
|
||||
.await;
|
||||
cx.simulate_shared_keystrokes(["escape"]).await;
|
||||
cx.simulate_shared_keystrokes(["g", "g"]).await;
|
||||
cx.simulate_shared_keystrokes(["5", "d", "j"]).await;
|
||||
cx.assert_shared_state(indoc! { "ˇ"}).await;
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_clear_counts(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = NeovimBackedTestContext::new(cx).await;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue