mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 19:20:21 +03:00
start possibly be large than b.contents
This commit is contained in:
parent
c93373804d
commit
db1e92033a
@ -799,6 +799,9 @@ func (b *Buffer) renderAt(ctx *strife.Renderer, rx int, ry int) {
|
||||
|
||||
start := b.cam.y
|
||||
upper := b.cam.y + visibleLines
|
||||
if start > len(b.contents) {
|
||||
start = len(b.contents)
|
||||
}
|
||||
if upper > len(b.contents) {
|
||||
upper = len(b.contents)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user