From 579e4ab56b659415da963bc589ecd17433563e55 Mon Sep 17 00:00:00 2001 From: nagytiboradam Date: Thu, 19 Dec 2024 22:44:32 +0100 Subject: [PATCH] fix: "Toggle Decode" only implemented for Describe --- internal/view/live_view.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/view/live_view.go b/internal/view/live_view.go index bc24d4d2d4..48777bf212 100644 --- a/internal/view/live_view.go +++ b/internal/view/live_view.go @@ -22,6 +22,7 @@ import ( const ( liveViewTitleFmt = "[fg:bg:b] %s([hilite:bg:b]%s[fg:bg:-])[fg:bg:-] " yamlAction = "YAML" + describeAction = "Describe" ) // LiveView represents a live text viewer. @@ -158,7 +159,7 @@ func (v *LiveView) bindKeys() { if v.title == yamlAction { v.actions.Add(ui.KeyM, ui.NewKeyAction("Toggle ManagedFields", v.toggleManagedCmd, true)) } - if v.model != nil && v.model.GVR().IsDecodable() { + if v.model != nil && v.model.GVR().IsDecodable() && v.title == describeAction { v.actions.Add(ui.KeyX, ui.NewKeyAction("Toggle Decode", v.toggleEncodedDecodedCmd, true)) } }