mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 22:07:09 +09:00
Don't overwrite user bindings
This fix still needs more work. Ref #1821
This commit is contained in:
@@ -50,14 +50,6 @@ func InitBindings() {
|
||||
}
|
||||
}
|
||||
|
||||
for p, bind := range Binder {
|
||||
defaults := DefaultBindings(p)
|
||||
|
||||
for k, v := range defaults {
|
||||
BindKey(k, v, bind)
|
||||
}
|
||||
}
|
||||
|
||||
for k, v := range parsed {
|
||||
switch val := v.(type) {
|
||||
case string:
|
||||
@@ -76,6 +68,14 @@ func InitBindings() {
|
||||
screen.TermMessage("Error reading bindings.json: non-string and non-map entry", k)
|
||||
}
|
||||
}
|
||||
|
||||
for p, bind := range Binder {
|
||||
defaults := DefaultBindings(p)
|
||||
|
||||
for k, v := range defaults {
|
||||
BindKey(k, v, bind)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BindKey(k, v string, bind func(e Event, a string)) {
|
||||
|
||||
Reference in New Issue
Block a user