Split improvements

This commit is contained in:
Zachary Yedidia
2019-01-04 18:08:11 -05:00
parent 8939fe169b
commit e101dcd55a
5 changed files with 60 additions and 23 deletions

View File

@@ -219,12 +219,14 @@ func (h *BufHandler) vsplit(buf *buffer.Buffer) {
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)
}
// BufKeyActions contains the list of all possible key actions the bufhandler could execute