fix a lot of logic
This commit is contained in:
parent
b406c0ce4e
commit
62af1965f8
4 changed files with 57 additions and 86 deletions
|
|
@ -62,9 +62,8 @@ local function parse_command(args)
|
|||
if vim.tbl_contains(platforms, first) then
|
||||
if #filtered_args == 1 then
|
||||
return {
|
||||
type = 'platform_only',
|
||||
platform = first,
|
||||
language = language,
|
||||
type = 'error',
|
||||
message = 'Too few arguments - specify a contest.',
|
||||
}
|
||||
elseif #filtered_args == 2 then
|
||||
return {
|
||||
|
|
@ -147,12 +146,6 @@ function M.handle_command(opts)
|
|||
return
|
||||
end
|
||||
|
||||
if cmd.type == 'platform_only' then
|
||||
local setup = require('cp.setup')
|
||||
setup.set_platform(cmd.platform)
|
||||
return
|
||||
end
|
||||
|
||||
if cmd.type == 'contest_setup' then
|
||||
local setup = require('cp.setup')
|
||||
if setup.set_platform(cmd.platform) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue