feat: configure half-page viewport scroll distance

This commit is contained in:
Valdemar Lorenzen
2026-10-16 10:25:27 +02:00
parent 5a8c37b2f2
commit 284ddd3713
11 changed files with 96 additions and 7 deletions
+13
View File
@@ -12617,6 +12617,19 @@ end
editor.handle(Input::Ctrl('u'));
render(&mut terminal, &mut views, &mut editor);
assert_eq!(offset(&views), initial);
editor.set_scroll_half_page_lines(std::num::NonZeroUsize::new(3));
editor.handle(Input::Char('2'));
editor.handle(Input::Ctrl('d'));
render(&mut terminal, &mut views, &mut editor);
if !wrapped {
assert_eq!(offset(&views), (initial.0 + 6, 0));
}
assert_eq!(editor.carets(), carets);
assert_eq!(editor.selections(), selections);
editor.handle(Input::Char('2'));
editor.handle(Input::Ctrl('u'));
render(&mut terminal, &mut views, &mut editor);
assert_eq!(offset(&views), initial);
if !visual {
editor.handle(Input::Char('3'));
editor.handle(Input::Alt('j'));