Fix possible overflow error

This commit is contained in:
Zachary Yedidia
2017-03-25 17:31:46 -04:00
parent d413562145
commit 9c5ab2afbd
2 changed files with 10 additions and 1 deletions

View File

@@ -188,6 +188,9 @@ func (c *CellView) Draw(buf *Buffer, top, height, left, width int) {
}
for i := top; i < top+height; i++ {
if i >= buf.NumLines {
break
}
buf.SetMatch(i, nil)
}
}