aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 93703953..4a389429 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -751,8 +751,8 @@ fn goto_window(cx: &mut Context, align: Align) {
Align::Center => (view.offset.row + ((last_line - view.offset.row) / 2)),
Align::Bottom => last_line.saturating_sub(scrolloff + count),
}
- .min(last_line.saturating_sub(scrolloff))
- .max(view.offset.row + scrolloff);
+ .max(view.offset.row + scrolloff)
+ .min(last_line.saturating_sub(scrolloff));
let pos = doc.text().line_to_char(line);