vim: Allow up/down/left/right in vim mode
The user impact of this is to 5<down> to move 5 lines at a time.
This commit is contained in:
parent
5860b7b143
commit
d6b1af6244
2 changed files with 15 additions and 0 deletions
|
@ -98,3 +98,14 @@ async fn test_buffer_search(cx: &mut gpui::TestAppContext) {
|
|||
assert_eq!(bar.query_editor.read(cx).text(cx), "jumps");
|
||||
})
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_count_down(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = VimTestContext::new(cx, true).await;
|
||||
|
||||
cx.set_state(indoc! {"aˇa\nbb\ncc\ndd\nee"}, Mode::Normal);
|
||||
cx.simulate_keystrokes(["2", "down"]);
|
||||
cx.assert_editor_state("aa\nbb\ncˇc\ndd\nee");
|
||||
cx.simulate_keystrokes(["9", "down"]);
|
||||
cx.assert_editor_state("aa\nbb\ncc\ndd\neˇe");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue