Skip to content

feat: implement lazygit-compatible scrollbars in list views - #42

Open
felipecm-br wants to merge 1 commit into
Blankeos:mainfrom
felipecm-br:feat/scrollbar-parity
Open

felipecm-br wants to merge 1 commit into
Blankeos:mainfrom
felipecm-br:feat/scrollbar-parity

Conversation

@felipecm-br

Copy link
Copy Markdown
Contributor

Description

Implements exact lazygit-compatible vertical scrollbar rendering logic across all scrollable list views and diffs.

Details

  • Ported calcScrollbar, calcScrollbarHeight, and calcRealScrollbarStartEnd from lazygit (pkg/gocui/scrollbar.go and gui.go).
  • Renders the vertical scroll indicator using ▐ (Right Half Block) on the right panel border with matching theme border styling.
  • Integrates into list views (render_list_with_range and render_list_with_range_raw) and side-by-side / unified diff views.
  • Comprehensive unit tests matching lazygit's scrollbar_test.go verifying thumb height, scroll range, and boundary conditions.

Validation

  • cargo test --bin lazygitrs (all 378 tests passed)
  • cargo fmt --check

@felipecm-br

Copy link
Copy Markdown
Contributor Author
image

This is how the scroll looks like :)

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.

1 participant