Buffer: fix max scroll going one line beyond end
This commit is contained in:
parent
1cf36f8a5d
commit
afc5b525f1
1 changed files with 1 additions and 1 deletions
|
|
@ -480,7 +480,7 @@ impl Buffer {
|
|||
let scroll_end = self.scroll + lines;
|
||||
let total_layout = self.shape_until(font_system, scroll_end);
|
||||
|
||||
self.scroll = cmp::max(0, cmp::min(total_layout - (lines - 1), self.scroll));
|
||||
self.scroll = cmp::max(0, cmp::min(total_layout - lines, self.scroll));
|
||||
}
|
||||
|
||||
pub fn layout_cursor(&self, cursor: &Cursor) -> LayoutCursor {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue