Start working on splits

This commit is contained in:
Zachary Yedidia
2019-01-04 17:40:56 -05:00
parent e29cae4f7f
commit 8939fe169b
9 changed files with 465 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ import (
"github.com/zyedidia/micro/cmd/micro/buffer"
"github.com/zyedidia/micro/cmd/micro/display"
"github.com/zyedidia/micro/cmd/micro/info"
"github.com/zyedidia/micro/cmd/micro/views"
)
type EditPane struct {
@@ -27,6 +28,17 @@ func NewBufEditPane(x, y, width, height int, b *buffer.Buffer) *EditPane {
return e
}
func NewTabPane(width, height int, b *buffer.Buffer) *TabPane {
t := new(TabPane)
t.Node = views.NewRoot(0, 0, width, height)
e := NewBufEditPane(0, 0, width, height, b)
e.splitID = t.ID()
t.Panes = append(t.Panes, e)
return t
}
func NewInfoBar() *InfoPane {
e := new(InfoPane)
ib := info.NewBuffer()