From 71ee185b8020f6627c8b8e5dda599106d5eaa9c0 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Thu, 23 Nov 2017 14:44:07 -0500 Subject: [PATCH] Check width before drawing cellview Fixes #927 --- cmd/micro/cellview.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/micro/cellview.go b/cmd/micro/cellview.go index 2cab7a08..1cab7691 100644 --- a/cmd/micro/cellview.go +++ b/cmd/micro/cellview.go @@ -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))