• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / revdiff / 33195480393
90%
master: 91%

Build:
Build:
LAST BUILD BRANCH: annot-input-color
DEFAULT BRANCH: master
Ran 28 Aug 2026 05:38PM UTC
Jobs 1
Files 79
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Aug 2026 05:05PM UTC coverage: 90.152% (+0.04%) from 90.117%
33195480393

Pull #337

github

umputun
fix(ui): bound horizontal scroll to the widest rendered line

Holding the right arrow scrolled scrollX past the widest line without limit.
Once past every line applyHorizontalScroll takes its plain-cut branch with
both overflow flags false, so every row cuts to nothing and the diff pane
goes blank with no « indicator to explain it — recoverable only by scrolling
all the way back or switching files.

Every nonzero write to scrollX now goes through setScrollX, bounded by the
widest row the pane currently renders, so a runaway offset can no longer cut
the whole document away. This does not promise every viewport shows content
at every legal offset: a wide row further down the file owns the bound, so
short rows on screen can still cut to empty. That per-line behavior lives in
applyHorizontalScroll and is pinned as deliberate by
TestModel_ApplyHorizontalScrollNoLeftIndicatorWhenScrolledPastContent.

The bound reads the rendered document rather than the loaded one: collapsed
mode hides removed lines, so a wide hidden removal must not widen it, and
expanding a hunk reveals those lines again. Delete-only placeholders are
measured from their own synthetic text.

Per-line widths are cached at load, parallel to file.lines, so the bound
costs an integer scan rather than re-measuring strings on every keypress.
The walk uses a moving hunk index rather than hunkStartFor, which rescans
the whole hunk slice per line.

Layout changes that widen the pane lower the bound without a horizontal
keypress of their own. All four — resize, tree hide, line-number and blame
toggles — already render through syncViewportToCursor, so the clamp lives
there; the two collapsed mutations render directly and clamp locally.

Related to #334, which surfaced this while asking for mouse horizontal
scroll. The mouse gesture is a separate question and stays open.
Pull Request #337: fix(ui): bound horizontal scroll to the widest rendered line

66 of 68 new or added lines in 3 files covered. (97.06%)

11608 of 12876 relevant lines covered (90.15%)

3469.07 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
96.3
-0.14% app/ui/diffnav.go
Jobs
ID Job ID Ran Files Coverage
1 33195480393.1 28 Aug 2026 05:38PM UTC 79
90.15
GitHub Action Run
Source Files on build 33195480393
  • Tree
  • List 79
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #337
  • PR Base - master (#32406720222)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc