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

umputun / revdiff / 24636874195
90%

Build:
DEFAULT BRANCH: master
Ran 19 Apr 2026 07:10PM UTC
Jobs 1
Files 58
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

19 Apr 2026 07:09PM UTC coverage: 89.063% (+0.1%) from 88.944%
24636874195

push

github

web-flow
fix(ui): keep cursor on same screen row when paging (#125)

* fix(ui): keep cursor on same screen row when paging

PgDown placed the cursor at the viewport top and PgUp at the bottom, so
PgDown then PgUp did not return to the prior position. Share the existing
half-page helper logic so full-page and half-page both scroll cursor and
viewport by the same amount, preserving the cursor's relative on-screen row.

Related to #124

* fix(ui): keep cursor visible when paging on annotated lines

Extend the page/half-page helpers to treat an annotation-row flip
(diffCursor unchanged but cursorOnAnnotation toggled) as real progress,
and scroll the viewport by the cursor's actual visual delta instead of
the requested row count. Without this, PgDown from a line with an
annotation exited the helper loop immediately on the cursorOnAnnotation
flip, then scrolled the viewport by a full page anyway, pushing the
cursor above the viewport.

Rename the helper parameter from n to rows to match the godoc.

Extend TestModel_PgDownPgUpPreservesRelativeCursorPosition with a
mid-screen subcase (so the relative-row assertion is not degenerate at
screen row 0) and split into subtests with a fresh model per case.
Add TestModel_PgDownKeepsCursorVisibleOnAnnotatedLine to lock in the
visibility invariant.

Related to #124

* test(ui): add wrap-mode subtest for PgDown/PgUp cursor row invariant

Adds a wrap-mode subtest to TestModel_PgDownPgUpPreservesRelativeCursorPosition
with a mix of short and long lines. Verified wrap is active (long lines
occupy 4 visual rows). Locks in the invariant that paging preserves the
cursor's on-screen row when cursorViewportY math spans multi-row wrapped lines.

Addresses Copilot review feedback on PR #125.

Related to #124

23 of 23 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

7549 of 8476 relevant lines covered (89.06%)

474.86 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
95.86
-0.46% app/ui/diffview.go
Jobs
ID Job ID Ran Files Coverage
1 24636874195.1 19 Apr 2026 07:09PM UTC 58
89.06
GitHub Action Run
Source Files on build 24636874195
  • Tree
  • List 58
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 533502b9 on github
  • Prev Build on master (#24600877299)
  • Next Build on master (#24640363081)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc