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

@@ -988,7 +988,7 @@ func (h *BufHandler) Escape() bool {
// Quit this will close the current tab or view that is open
func (h *BufHandler) Quit() bool {
quit := func() {
if len(MainTab.Panes) > 1 {
if len(MainTab().Panes) > 1 {
h.Unsplit()
} else {
screen.Screen.Fini()
@@ -1039,12 +1039,12 @@ func (h *BufHandler) HSplitBinding() bool {
// Unsplit closes all splits in the current tab except the active one
func (h *BufHandler) Unsplit() bool {
n := MainTab.GetNode(h.splitID)
n := MainTab().GetNode(h.splitID)
n.Unsplit()
MainTab.RemovePane(MainTab.GetPane(h.splitID))
MainTab.Resize()
MainTab.SetActive(len(MainTab.Panes) - 1)
MainTab().RemovePane(MainTab().GetPane(h.splitID))
MainTab().Resize()
MainTab().SetActive(len(MainTab().Panes) - 1)
return false
}