Begin tab implementation

This commit is contained in:
Zachary Yedidia
2019-01-09 20:07:18 -05:00
parent 853c143696
commit d54ccace1f
8 changed files with 175 additions and 47 deletions

View File

@@ -220,17 +220,17 @@ func (h *BufHandler) DoRuneInsert(r rune) {
func (h *BufHandler) vsplit(buf *buffer.Buffer) {
e := NewBufEditPane(0, 0, 0, 0, buf)
e.splitID = MainTab.GetNode(h.splitID).VSplit(h.Buf.Settings["splitright"].(bool))
MainTab.Panes = append(MainTab.Panes, e)
MainTab.Resize()
MainTab.SetActive(len(MainTab.Panes) - 1)
e.splitID = MainTab().GetNode(h.splitID).VSplit(h.Buf.Settings["splitright"].(bool))
MainTab().Panes = append(MainTab().Panes, e)
MainTab().Resize()
MainTab().SetActive(len(MainTab().Panes) - 1)
}
func (h *BufHandler) hsplit(buf *buffer.Buffer) {
e := NewBufEditPane(0, 0, 0, 0, buf)
e.splitID = MainTab.GetNode(h.splitID).HSplit(h.Buf.Settings["splitbottom"].(bool))
MainTab.Panes = append(MainTab.Panes, e)
MainTab.Resize()
MainTab.SetActive(len(MainTab.Panes) - 1)
e.splitID = MainTab().GetNode(h.splitID).HSplit(h.Buf.Settings["splitbottom"].(bool))
MainTab().Panes = append(MainTab().Panes, e)
MainTab().Resize()
MainTab().SetActive(len(MainTab().Panes) - 1)
}
// BufKeyActions contains the list of all possible key actions the bufhandler could execute