diff --git a/gui/buffer.go b/gui/buffer.go index a5f934f..b6e1138 100644 --- a/gui/buffer.go +++ b/gui/buffer.go @@ -62,7 +62,6 @@ func NewBuffer(conf *cfg.TomlConfig, parent *View, index int) *Buffer { filePath: "", cam: &camera{0, 0}, } - buff.appendLine("") return buff } diff --git a/gui/palette.go b/gui/palette.go index fae53c0..c31a6f0 100644 --- a/gui/palette.go +++ b/gui/palette.go @@ -24,6 +24,7 @@ func NewCommandPalette(conf cfg.TomlConfig) *CommandPalette { parentBuff: nil, HasFocus: false, } + palette.buff.appendLine("") return palette } diff --git a/gui/view.go b/gui/view.go index 25f6628..5d1c2c0 100644 --- a/gui/view.go +++ b/gui/view.go @@ -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