mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-20 05:19:24 +02:00
better error messages
This commit is contained in:
parent
e425f1df87
commit
7194dfa43c
@ -338,14 +338,14 @@ func (gui *Gui) getKey(name string) interface{} {
|
||||
if len(key) > 1 {
|
||||
binding := keymap[strings.ToLower(key)]
|
||||
if binding == nil {
|
||||
log.Fatal("Unrecognized binding: " + strings.ToLower(key))
|
||||
log.Fatalf("Unrecognized key %s for keybinding %s", strings.ToLower(key), name)
|
||||
} else {
|
||||
return binding
|
||||
}
|
||||
} else if len(key) == 1 {
|
||||
return []rune(key)[0]
|
||||
}
|
||||
log.Fatal("Key empty for function: " + strings.ToLower(name))
|
||||
log.Fatal("Key empty for keybinding: " + strings.ToLower(name))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user