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

guptarohit / asciigraph / 27853491383

19 Jun 2026 11:45PM UTC coverage: 92.937% (+0.05%) from 92.892%
27853491383

push

github

web-flow
feat(cli): clear only previous graph in realtime mode (#79)

  **Summary**
Fixes #44 by clearing only the previous graph instead of wiping the
whole terminal in realtime mode, removing flicker and preserving any
output above the graph.

  **Changes**
- Add exported `asciigraph.ClearLines(n)` helper that erases the last
`n` lines (cursor up + clear to end of screen) without touching content
above them.
- Realtime CLI now tracks the last graph height (`lastGraphLines`) and
calls `ClearLines` instead of the full-screen `Clear()`.

  **Verification**
- `go test ./...` (incl. new `TestClearLines`), `go vet ./...`, `gofmt`,
and `GOARCH=arm` cross-compile all pass.
- Manual: `seq 1 100 | go run ./cmd/asciigraph -r` redraws in place with
no flicker; captured output contains zero full-screen `\033[2J` wipes.

  **Closes** #44

579 of 623 relevant lines covered (92.94%)

1476.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.34
/utils.go


Source Not Available

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