Problem: switching contests while a run, interactive session, or stress test was in progress left orphaned callbacks and terminal jobs alive. Running `:CP run` twice also allowed the first run's stale output to overwrite the buffer after the second run completed. Solution: replace the `io_view_running` bool in `views.lua` with a generation counter (`_run_gen`); each `run_io_view` call increments it and captures a local `gen`, and async callbacks bail out early when `gen ~= _run_gen`. Add `cancel_io_view`, `cancel_interactive` to `views.lua` and `cancel` to `stress.lua` for forceful teardown without layout restore. Call these in `setup_contest` whenever `is_new_contest` is true. |
||
|---|---|---|
| .. | ||
| ansi.lua | ||
| diff.lua | ||
| edit.lua | ||
| highlight.lua | ||
| layouts.lua | ||
| views.lua | ||