mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Make LabelFromKey return an empty string for unset keys
It previously returned "\x00", which is probably not intended, but happened to work.
This commit is contained in:
@ -17,6 +17,10 @@ func Label(name string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func LabelFromKey(key types.Key) string {
|
func LabelFromKey(key types.Key) string {
|
||||||
|
if key == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
keyInt := 0
|
keyInt := 0
|
||||||
|
|
||||||
switch key := key.(type) {
|
switch key := key.(type) {
|
||||||
|
Reference in New Issue
Block a user