From 96a6e659a61a1e0a2a25ffa7981b0779ccd07755 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 19 Jul 2025 12:10:50 +0200 Subject: [PATCH] Make LabelFromKey return an empty string for unset keys It previously returned "\x00", which is probably not intended, but happened to work. --- pkg/gui/keybindings/keybindings.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/gui/keybindings/keybindings.go b/pkg/gui/keybindings/keybindings.go index 0db3e8a61..76b757b72 100644 --- a/pkg/gui/keybindings/keybindings.go +++ b/pkg/gui/keybindings/keybindings.go @@ -17,6 +17,10 @@ func Label(name string) string { } func LabelFromKey(key types.Key) string { + if key == nil { + return "" + } + keyInt := 0 switch key := key.(type) {