Check width before drawing cellview

Fixes #927
This commit is contained in:
Zachary Yedidia
2017-11-23 14:44:07 -05:00
parent 0360a2fcb5
commit 71ee185b80

View File

@@ -65,6 +65,10 @@ type CellView struct {
}
func (c *CellView) Draw(buf *Buffer, top, height, left, width int) {
if width <= 0 {
return
}
tabsize := int(buf.Settings["tabsize"].(float64))
softwrap := buf.Settings["softwrap"].(bool)
indentrunes := []rune(buf.Settings["indentchar"].(string))