mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
gui: show gg/G shortcuts in the options bar for the main panel
When the main panel is focused (e.g. the Container Config screen) the options bar now lists the gg/G scroll-to-top/bottom shortcuts alongside the existing scroll and navigation hints.
This commit is contained in:
parent
a20fa161cc
commit
4298b4cfaa
2 changed files with 12 additions and 0 deletions
|
|
@ -171,6 +171,16 @@ func (gui *Gui) renderGlobalOptions() error {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (gui *Gui) renderMainOptions() error {
|
||||||
|
return gui.renderOptionsMap(map[string]string{
|
||||||
|
"PgUp/PgDn": gui.Tr.Scroll,
|
||||||
|
"← → ↑ ↓": gui.Tr.Navigate,
|
||||||
|
"gg": gui.Tr.GotoTop,
|
||||||
|
"G": gui.Tr.GotoBottom,
|
||||||
|
"esc": gui.Tr.Return,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func (gui *Gui) goEvery(interval time.Duration, function func() error) {
|
func (gui *Gui) goEvery(interval time.Duration, function func() error) {
|
||||||
_ = function() // time.Tick doesn't run immediately so we'll do that here // TODO: maybe change
|
_ = function() // time.Tick doesn't run immediately so we'll do that here // TODO: maybe change
|
||||||
go func() {
|
go func() {
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,8 @@ func (gui *Gui) renderPanelOptions() error {
|
||||||
return gui.renderMenuOptions()
|
return gui.renderMenuOptions()
|
||||||
case "confirmation":
|
case "confirmation":
|
||||||
return gui.renderConfirmationOptions()
|
return gui.renderConfirmationOptions()
|
||||||
|
case "main":
|
||||||
|
return gui.renderMainOptions()
|
||||||
}
|
}
|
||||||
return gui.renderGlobalOptions()
|
return gui.renderGlobalOptions()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue