refactor: make editor.update_scroll_dest_abs public
This commit is contained in:
parent
bca4dbf777
commit
f3440d4f83
1 changed files with 1 additions and 1 deletions
|
|
@ -2626,7 +2626,7 @@ pub const Editor = struct {
|
||||||
self.view.row = row;
|
self.view.row = row;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_scroll_dest_abs(self: *Self, dest: usize) void {
|
pub fn update_scroll_dest_abs(self: *Self, dest: usize) void {
|
||||||
const root = self.buf_root() catch return;
|
const root = self.buf_root() catch return;
|
||||||
const max_view = if (root.lines() <= scroll_cursor_min_border_distance) 0 else root.lines() - scroll_cursor_min_border_distance;
|
const max_view = if (root.lines() <= scroll_cursor_min_border_distance) 0 else root.lines() - scroll_cursor_min_border_distance;
|
||||||
self.scroll_dest = @min(dest, max_view);
|
self.scroll_dest = @min(dest, max_view);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue