Merge pull request #840 from technomancy/resume-reload

When --watch flag is passed, reload all the code upon resume.
This commit is contained in:
Vadim Grigoruk 2019-05-14 15:52:48 +03:00 committed by GitHub
commit 7369fcac75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2156,6 +2156,11 @@ static void onConsoleResumeCommand(Console* console, const char* param)
{ {
commandDone(console); commandDone(console);
const tic_script_config* script_config = console->tic->api.get_script_config(console->tic);
if (script_config->eval && console->codeLiveReload.active)
{
script_config->eval(console->tic, console->tic->cart.code.data);
}
console->tic->api.resume(console->tic); console->tic->api.resume(console->tic);
resumeRunMode(); resumeRunMode();