|
|
@ -875,8 +875,8 @@ fn goto_window(cx: &mut Context, align: Align) {
|
|
|
|
let last_line = view.last_line(doc);
|
|
|
|
let last_line = view.last_line(doc);
|
|
|
|
|
|
|
|
|
|
|
|
let line = match align {
|
|
|
|
let line = match align {
|
|
|
|
Align::Top => (view.offset.row + scrolloff + count),
|
|
|
|
Align::Top => view.offset.row + scrolloff + count,
|
|
|
|
Align::Center => (view.offset.row + ((last_line - view.offset.row) / 2)),
|
|
|
|
Align::Center => view.offset.row + ((last_line - view.offset.row) / 2),
|
|
|
|
Align::Bottom => last_line.saturating_sub(scrolloff + count),
|
|
|
|
Align::Bottom => last_line.saturating_sub(scrolloff + count),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.max(view.offset.row + scrolloff)
|
|
|
|
.max(view.offset.row + scrolloff)
|
|
|
|