From a2a3c8f365b753e3abe585a2b48462133f02f1dd Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Mon, 22 Sep 2025 19:11:55 -0400 Subject: [PATCH] fix: edge cases --- lua/cp/ui/panel.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/cp/ui/panel.lua b/lua/cp/ui/panel.lua index fd45ea4..c4a8738 100644 --- a/lua/cp/ui/panel.lua +++ b/lua/cp/ui/panel.lua @@ -41,6 +41,14 @@ function M.toggle_run_panel(is_debug) return end + if not state.get_contest_id() then + logger.log( + 'No contest configured. Use :CP to set up first.', + vim.log.levels.ERROR + ) + return + end + local problem_id = get_current_problem() if not problem_id then return