Merge pull request #110 from barrett-ruth/lol
fix(hook): run hooks truly befoire
This commit is contained in:
commit
543a2a7c06
1 changed files with 8 additions and 8 deletions
|
|
@ -52,6 +52,14 @@ function M.toggle_run_panel(is_debug)
|
|||
)
|
||||
|
||||
local config = config_module.get_config()
|
||||
if config.hooks and config.hooks.before_run then
|
||||
config.hooks.before_run(state)
|
||||
end
|
||||
|
||||
if is_debug and config.hooks and config.hooks.before_debug then
|
||||
config.hooks.before_debug(state)
|
||||
end
|
||||
|
||||
local run = require('cp.runner.run')
|
||||
|
||||
local input_file = state.get_input_file()
|
||||
|
|
@ -159,14 +167,6 @@ function M.toggle_run_panel(is_debug)
|
|||
|
||||
setup_keybindings_for_buffer(test_buffers.tab_buf)
|
||||
|
||||
if config.hooks and config.hooks.before_run then
|
||||
config.hooks.before_run(state)
|
||||
end
|
||||
|
||||
if is_debug and config.hooks and config.hooks.before_debug then
|
||||
config.hooks.before_debug(state)
|
||||
end
|
||||
|
||||
local execute = require('cp.runner.execute')
|
||||
local contest_config = config.contests[state.get_platform() or '']
|
||||
local compile_result = execute.compile_problem(contest_config, is_debug)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue