summaryrefslogtreecommitdiffstats
path: root/scripts/generate_cheatsheet.go
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/generate_cheatsheet.go')
-rw-r--r--scripts/generate_cheatsheet.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/generate_cheatsheet.go b/scripts/generate_cheatsheet.go
index f3d5e84db..56059d3bc 100644
--- a/scripts/generate_cheatsheet.go
+++ b/scripts/generate_cheatsheet.go
@@ -83,15 +83,13 @@ func getBindingSections(mApp *app.App) []*bindingSection {
bindingSections = addBinding(title, bindingSections, binding)
}
- for view, contexts := range mApp.Gui.GetContextMap() {
- for contextName, contextBindings := range contexts {
- translatedView := localisedTitle(mApp, view)
- translatedContextName := localisedTitle(mApp, contextName)
- title := fmt.Sprintf("%s (%s)", translatedView, translatedContextName)
-
- for _, binding := range contextBindings {
- bindingSections = addBinding(title, bindingSections, binding)
- }
+ for contextName, contextBindings := range mApp.Gui.GetContextMap() {
+ translatedView := localisedTitle(mApp, contextBindings[0].ViewName)
+ translatedContextName := localisedTitle(mApp, contextName)
+ title := fmt.Sprintf("%s (%s)", translatedView, translatedContextName)
+
+ for _, binding := range contextBindings {
+ bindingSections = addBinding(title, bindingSections, binding)
}
}