mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-10 10:35:16 +03:00
cargo fmt
This commit is contained in:
parent
25a8a475c5
commit
d03982ee43
@ -451,14 +451,11 @@ fn goto_window(cx: &mut Context, align: Align) {
|
||||
let (view, doc) = current!(cx.editor);
|
||||
|
||||
let height = view.area.height.saturating_sub(1) as usize; // -1 for statusline
|
||||
|
||||
// - 1 so we have at least one gap in the middle.
|
||||
// a height of 6 with padding of 3 on each side will keep shifting the view back and forth
|
||||
// as we type
|
||||
let scrolloff = cx
|
||||
.editor
|
||||
.config
|
||||
.scrolloff
|
||||
.min(height.saturating_sub(1) / 2);
|
||||
let scrolloff = cx.editor.config.scrolloff.min(height.saturating_sub(1) / 2);
|
||||
|
||||
let last_line = view.last_line(doc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user