reset buffer width so now the buffers actually render...

This commit is contained in:
Felix Angell 2018-04-29 00:12:33 +01:00
parent be01667137
commit 0992e6f73e
3 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,6 @@ func NewBuffer(conf *cfg.TomlConfig, parent *View, index int) *Buffer {
filePath: "",
cam: &camera{0, 0},
}
buff.appendLine("")
return buff
}

View File

@ -24,6 +24,7 @@ func NewCommandPalette(conf cfg.TomlConfig) *CommandPalette {
parentBuff: nil,
HasFocus: false,
}
palette.buff.appendLine("")
return palette
}

View File

@ -119,6 +119,7 @@ func (n *View) AddBuffer() *Buffer {
// note that we +1 the components because
// we haven't yet added the panel
var bufferWidth int
bufferWidth = n.w / (len(n.buffers) + 1)
n.buffers[c.index] = c
n.focusedBuff = c.index