Improve drawing
This commit is contained in:
parent
b669437296
commit
0adb601f3c
2 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue