From 281dc08fb5c4dc7a69abc02a8566a345fa461d0a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 16 Aug 2026 14:00:47 +0200 Subject: [PATCH] Leave a command with nothing to say out of the options bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A command that acts on a diff selection has nothing to say over content that isn't a diff, and says so by describing itself as nothing — but a binding that is displayed on screen is displayed whatever its description, so it would show as a key with an empty label. Leave it out instead. Co-authored-by: Claude Opus 5 (1M context) --- pkg/gui/options_map.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/gui/options_map.go b/pkg/gui/options_map.go index 962187bff..880a766b8 100644 --- a/pkg/gui/options_map.go +++ b/pkg/gui/options_map.go @@ -50,7 +50,11 @@ func (self *OptionsMapMgr) renderContextOptionsMap() { })...) bindingsToDisplay := lo.Filter(allBindings, func(binding *types.Binding, _ int) bool { - return len(binding.Keys) > 0 && binding.DisplayOnScreen && !binding.IsDisabled() + // A binding that describes itself as nothing has nothing to do where we are — + // that is how a command which only applies to some of a view's contents says so + // — and an empty entry in the options bar would say nothing about it. + return len(binding.Keys) > 0 && binding.DisplayOnScreen && !binding.IsDisabled() && + binding.GetShortDescription() != "" }) optionsMap := lo.Map(bindingsToDisplay, func(binding *types.Binding, _ int) bindingInfo {