diff --git a/cmd/micro/cellview.go b/cmd/micro/cellview.go index 729a0aee..a109f291 100644 --- a/cmd/micro/cellview.go +++ b/cmd/micro/cellview.go @@ -103,12 +103,9 @@ func (c *CellView) Draw(buf *Buffer, top, height, left, width int) { nextLine := line[colN:] lineLength := min(StringWidth(string(nextLine), tabsize), width) - if len(c.lines[viewLine]) != lineLength { - c.lines[viewLine] = make([]*Char, lineLength) - } + c.lines = append(c.lines, make([]*Char, lineLength)) viewCol = 0 - } } diff --git a/cmd/micro/view2.go b/cmd/micro/view2.go index fcfb892d..3d1cb7a8 100644 --- a/cmd/micro/view2.go +++ b/cmd/micro/view2.go @@ -42,7 +42,7 @@ func (v *View) DisplayView() { left := v.leftCol top := v.Topline - v.cellview.Draw(v.Buf, top, height, left, width) + v.cellview.Draw(v.Buf, top, height, left, width-v.lineNumOffset) screenX := v.x realLineN := top - 1