Add almost full option support

This commit is contained in:
Zachary Yedidia
2019-01-13 21:06:58 -05:00
parent 6c1db53b65
commit a5e7122b30
16 changed files with 285 additions and 279 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/zyedidia/micro/cmd/micro/buffer"
"github.com/zyedidia/micro/cmd/micro/display"
"github.com/zyedidia/micro/cmd/micro/util"
"github.com/zyedidia/micro/cmd/micro/screen"
"github.com/zyedidia/tcell"
)
@@ -28,7 +28,7 @@ func BufMapKey(k Event, action string) {
BufKeyStrings[k] = action
BufKeyBindings[k] = f
} else {
util.TermMessage("Error:", action, "does not exist")
screen.TermMessage("Error:", action, "does not exist")
}
}
@@ -43,7 +43,7 @@ func BufMapMouse(k MouseEvent, action string) {
// ensure we don't double bind a key
delete(BufMouseBindings, k)
} else {
util.TermMessage("Error:", action, "does not exist")
screen.TermMessage("Error:", action, "does not exist")
}
}
@@ -268,6 +268,9 @@ func (h *BufHandler) HSplitBuf(buf *buffer.Buffer) {
MainTab().Resize()
MainTab().SetActive(len(MainTab().Panes) - 1)
}
func (h *BufHandler) Close() {
h.Buf.Close()
}
// BufKeyActions contains the list of all possible key actions the bufhandler could execute
var BufKeyActions = map[string]BufKeyAction{