mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Start working on splits
This commit is contained in:
@@ -90,6 +90,8 @@ type BufHandler struct {
|
||||
|
||||
// Last search stores the last successful search for FindNext and FindPrev
|
||||
lastSearch string
|
||||
|
||||
splitID uint64
|
||||
}
|
||||
|
||||
func NewBufHandler(buf *buffer.Buffer, win display.Window) *BufHandler {
|
||||
@@ -212,6 +214,19 @@ 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()
|
||||
}
|
||||
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()
|
||||
}
|
||||
|
||||
// BufKeyActions contains the list of all possible key actions the bufhandler could execute
|
||||
var BufKeyActions = map[string]BufKeyAction{
|
||||
"CursorUp": (*BufHandler).CursorUp,
|
||||
|
||||
Reference in New Issue
Block a user