@@ -433,7 +433,7 @@ fn scroll(view: &mut View, offset: usize, direction: Direction) {
433 // clamp into viewport
433 // clamp into viewport
434 let line = (view.first_line + cursor_off).clamp(
434 let line = (view.first_line + cursor_off).clamp(
435 view.first_line + scrolloff,
435 view.first_line + scrolloff,
436− view.first_line + view.last_line().saturating_sub(scrolloff),
436+ view.last_line().saturating_sub(scrolloff),
439 let pos = pos_at_coords(text, Position::new(line, cursor.col)); // this func will properly truncate to line end
439 let pos = pos_at_coords(text, Position::new(line, cursor.col)); // this func will properly truncate to line end