vim: Fix ctrl-u/ctrl-d

They should work by exactly half a screen, and also move the cursor.
This commit is contained in:
Conrad Irwin
2023-09-26 22:28:04 -06:00
parent 342a00b89e
commit 8e1bbf32be
5 changed files with 122 additions and 21 deletions
+1 -1
View File
@@ -1429,7 +1429,7 @@ async fn test_scroll_page_up_page_down(cx: &mut gpui::TestAppContext) {
assert_eq!(editor.snapshot(cx).scroll_position(), vec2f(0., 3.));
editor.scroll_screen(&ScrollAmount::Page(-0.5), cx);
assert_eq!(editor.snapshot(cx).scroll_position(), vec2f(0., 2.));
assert_eq!(editor.snapshot(cx).scroll_position(), vec2f(0., 1.));
editor.scroll_screen(&ScrollAmount::Page(0.5), cx);
assert_eq!(editor.snapshot(cx).scroll_position(), vec2f(0., 3.));
});