Skip to content

Add wrap-around time navigation#26

Merged
koldunovn merged 1 commit intomainfrom
feature/wrap-around-navigation
Apr 8, 2026
Merged

Add wrap-around time navigation#26
koldunovn merged 1 commit intomainfrom
feature/wrap-around-navigation

Conversation

@koldunovn
Copy link
Copy Markdown
Collaborator

@koldunovn koldunovn commented Apr 8, 2026

Summary

  • Going backward from the first time record now wraps to the last record, and forward from the last wraps to the first
  • view_step_time() handles wrapping via modular arithmetic, with an early return guard for n_times <= 1
  • Simplifies animation loops in both X11 (ushow.c) and terminal (uterm.c) modes — no more special-case end-of-sequence handling

Addresses item 1 from #24.

Test plan

  • Step backward from the first time record — should jump to last
  • Step forward from the last time record — should jump to first
  • Animation (play button) should loop continuously without pausing
  • Single-timestep files should not cycle/flicker
  • Terminal mode (uterm) arrow keys and animation should also wrap

Going backward from the first record now jumps to the last, and forward
from the last jumps to the first. Simplifies animation loops in both
X11 and terminal modes since view_step_time() handles wrapping directly.
@koldunovn koldunovn force-pushed the feature/wrap-around-navigation branch from 4c1a4a9 to a5371d9 Compare April 8, 2026 10:20
@koldunovn koldunovn merged commit cb1006a into main Apr 8, 2026
5 checks passed
@koldunovn koldunovn mentioned this pull request Apr 8, 2026
4 tasks
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