@@ -451,14 +451,11 @@ fn goto_window(cx: &mut Context, align: Align) {
451 let (view, doc) = current!(cx.editor);
451 let (view, doc) = current!(cx.editor);
453 let height = view.area.height.saturating_sub(1) as usize; // -1 for statusline
453 let height = view.area.height.saturating_sub(1) as usize; // -1 for statusline
454 // - 1 so we have at least one gap in the middle.
455 // - 1 so we have at least one gap in the middle.
455 // a height of 6 with padding of 3 on each side will keep shifting the view back and forth
456 // a height of 6 with padding of 3 on each side will keep shifting the view back and forth
456 // as we type
457 // as we type
461− .min(height.saturating_sub(1) / 2);
458+ let scrolloff = cx.editor.config.scrolloff.min(height.saturating_sub(1) / 2);
463 let last_line = view.last_line(doc);
460 let last_line = view.last_line(doc);