Skip to content

Import upstream PR #816: add Vim-style main-panel navigation - #1

Merged
callmiy merged 7 commits into
personalfrom
import/pr-816-vim-main-navigation
Jul 20, 2026
Merged

callmiy merged 7 commits into
personalfrom
import/pr-816-vim-main-navigation

Conversation

@callmiy

@callmiy callmiy commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What changed

Imports jesseduffield/lazydocker#816 unchanged, preserving its six original commits and authorship.

  • Adds gg to jump to the top of the main panel.
  • Adds G to jump to the bottom.
  • Shows both actions in the main-panel options bar.
  • Adds unit tests and regenerates keybinding cheatsheets.

Why

Long container configuration views are cumbersome to navigate page by page. This implements the Vim-style navigation requested in upstream issue #792.

Validation

  • bash ./test.sh
  • GOFLAGS=-mod=vendor go test ./...
  • Linux, Windows, and macOS builds
  • go run scripts/cheatsheet/main.go check
  • go mod vendor with no diff
  • gofmt -s check

Upstream had no reported CI checks or reviews, so this fork validates the import independently.

Suhird and others added 7 commits June 24, 2026 13:38
Add GotoTop and GotoBottom translation entries used by the upcoming
vim-style gg/G navigation bindings in the main panel.
Add handlers that scroll the main panel to the top and bottom. gotoTopMain
implements the vim-style "gg" double press (gocui has no native key-sequence
support) by tracking the last 'g' press timestamp in the gui state, while
gotoBottomMain jumps to the final line, honouring the ScrollPastBottom config.

The origin math and double-press timing are factored into pure helpers so they
can be unit tested.
Pressing 'gg' jumps to the top and 'G' jumps to the bottom of the main panel,
matching vim navigation. The bindings are scoped to the main view so they apply
across all of its tabs (Config, Logs, Env, Stats, Top).
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.
Cover the gotoBottomOriginY origin math (scroll-past-bottom on/off, content
shorter than the view, empty content) and the isDoublePress timing used to
detect the vim-style "gg" double press.
Auto-generated from the new main-panel scroll-to-top/bottom bindings.
@callmiy
callmiy marked this pull request as ready for review July 20, 2026 22:54
@callmiy
callmiy merged commit 18e5714 into personal Jul 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants