cp.nvim/lua
Barrett Ruth b5aaac3862 fix(commands): canonicalize CF contest IDs and auto-restore on action
Problem: two related gaps in `handle_command` and `parse_command`.
Codeforces contest IDs were passed through raw, so URLs or problem IDs
with trailing letters (e.g. `1933A`, full contest URLs) caused scraper
failures. Separately, action commands like `:CP run` silently failed
when invoked with no active contest instead of attempting recovery.

Solution: add `canonicalize_cf_contest` to strip URLs and trailing
problem letters before building the `contest_setup` command. Add a
guard in `handle_command` that calls `restore_from_current_file()`
before dispatching any contest-requiring action when no platform is
active, returning early if no cached state is found.
2026-03-05 15:29:09 -05:00
..
cp fix(commands): canonicalize CF contest IDs and auto-restore on action 2026-03-05 15:29:09 -05:00