mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 17:50:15 +09:00
Move bindings location in code
This commit is contained in:
@@ -14,9 +14,9 @@ import (
|
||||
"github.com/zyedidia/tcell"
|
||||
)
|
||||
|
||||
var Bindings = DefaultBindings()
|
||||
|
||||
func InitBindings() {
|
||||
config.Bindings = DefaultBindings()
|
||||
|
||||
var parsed map[string]string
|
||||
defaults := DefaultBindings()
|
||||
|
||||
@@ -57,7 +57,7 @@ func BindKey(k, v string) {
|
||||
util.TermMessage("Raw events not supported yet")
|
||||
}
|
||||
|
||||
Bindings[k] = v
|
||||
config.Bindings[k] = v
|
||||
}
|
||||
|
||||
// findKeyEvent will find binding Key 'b' using string 'k'
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/zyedidia/micro/cmd/micro/buffer"
|
||||
"github.com/zyedidia/micro/cmd/micro/config"
|
||||
"github.com/zyedidia/micro/cmd/micro/screen"
|
||||
"github.com/zyedidia/micro/cmd/micro/shell"
|
||||
"github.com/zyedidia/micro/cmd/micro/shellwords"
|
||||
@@ -263,7 +264,7 @@ func (h *BufHandler) ShowKeyCmd(args []string) {
|
||||
return
|
||||
}
|
||||
|
||||
if action, ok := Bindings[args[0]]; ok {
|
||||
if action, ok := config.Bindings[args[0]]; ok {
|
||||
InfoBar.Message(action)
|
||||
} else {
|
||||
InfoBar.Message(args[0], " has no binding")
|
||||
|
||||
Reference in New Issue
Block a user