fix: edge cases
This commit is contained in:
parent
9c2be9c6b0
commit
a2a3c8f365
1 changed files with 8 additions and 0 deletions
|
|
@ -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 <platform> <contest> <problem> to set up first.',
|
||||
vim.log.levels.ERROR
|
||||
)
|
||||
return
|
||||
end
|
||||
|
||||
local problem_id = get_current_problem()
|
||||
if not problem_id then
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue