Skip to content

Commit 96a6e65

Browse files
committed
Make LabelFromKey return an empty string for unset keys
It previously returned "\x00", which is probably not intended, but happened to work.
1 parent 7fe96e9 commit 96a6e65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/gui/keybindings/keybindings.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ func Label(name string) string {
1717
}
1818

1919
func LabelFromKey(key types.Key) string {
20+
if key == nil {
21+
return ""
22+
}
23+
2024
keyInt := 0
2125

2226
switch key := key.(type) {

0 commit comments

Comments
 (0)