Use Horizontal ranges everywhere
This commit is contained in:
@@ -652,3 +652,59 @@ async fn test_selection_goal(cx: &mut gpui::TestAppContext) {
|
||||
Lorem Ipsum"})
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn test_wrapped_motions(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = NeovimBackedTestContext::new(cx).await;
|
||||
|
||||
cx.set_shared_wrap(12).await;
|
||||
|
||||
cx.set_shared_state(indoc! {"
|
||||
aaˇaa
|
||||
😃😃"
|
||||
})
|
||||
.await;
|
||||
cx.simulate_shared_keystrokes(["j"]).await;
|
||||
cx.assert_shared_state(indoc! {"
|
||||
aaaa
|
||||
😃ˇ😃"
|
||||
})
|
||||
.await;
|
||||
|
||||
cx.set_shared_state(indoc! {"
|
||||
123456789012aaˇaa
|
||||
123456789012😃😃"
|
||||
})
|
||||
.await;
|
||||
cx.simulate_shared_keystrokes(["j"]).await;
|
||||
cx.assert_shared_state(indoc! {"
|
||||
123456789012aaaa
|
||||
123456789012😃ˇ😃"
|
||||
})
|
||||
.await;
|
||||
|
||||
cx.set_shared_state(indoc! {"
|
||||
123456789012aaˇaa
|
||||
123456789012😃😃"
|
||||
})
|
||||
.await;
|
||||
cx.simulate_shared_keystrokes(["j"]).await;
|
||||
cx.assert_shared_state(indoc! {"
|
||||
123456789012aaaa
|
||||
123456789012😃ˇ😃"
|
||||
})
|
||||
.await;
|
||||
|
||||
cx.set_shared_state(indoc! {"
|
||||
123456789012aaaaˇaaaaaaaa123456789012
|
||||
wow
|
||||
123456789012😃😃😃😃😃😃123456789012"
|
||||
})
|
||||
.await;
|
||||
cx.simulate_shared_keystrokes(["j", "j"]).await;
|
||||
cx.assert_shared_state(indoc! {"
|
||||
123456789012aaaaaaaaaaaa123456789012
|
||||
wow
|
||||
123456789012😃😃ˇ😃😃😃😃123456789012"
|
||||
})
|
||||
.await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user