mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 09:42:34 +02:00
Change help menus: Only display shortcuts used on the page
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,9 @@ func (interceptKeyMap) ShortHelp() []key.Binding {
|
||||
}
|
||||
|
||||
func (m interceptKeyMap) FullHelp() [][]key.Binding {
|
||||
all := append(keys.Keys.Intercept.Bindings(), keys.Keys.Global.Bindings()...)
|
||||
g := keys.Keys.Global
|
||||
pageGlobals := []key.Binding{g.Up, g.Down, g.CycleFocus, g.ScrollUp, g.ScrollDown, g.Left, g.Right, g.Escape, g.SendToReplay, g.SendToDiff, g.Copy, g.CopyAs}
|
||||
all := append(keys.Keys.Intercept.Bindings(), pageGlobals...)
|
||||
all = append(all, g.CommonBindings()...)
|
||||
return keys.ChunkByWidth(all, m.width)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user