Fix scroll when vertical offset is exactly layout_height (#401)

This commit is contained in:
Erik McClure 2025-07-02 09:29:14 -07:00 committed by Jeremy Soller
parent 3b1aa511d1
commit f9e43cf355
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA

View file

@ -465,8 +465,7 @@ impl Buffer {
}
// Adjust scroll.vertical to be smaller by moving scroll.line forwards
//TODO: do we want to adjust it exactly to a layout line?
if line_i == self.scroll.line && layout_height < self.scroll.vertical {
if line_i == self.scroll.line && layout_height <= self.scroll.vertical {
self.scroll.line += 1;
self.scroll.vertical -= layout_height;
}