bugfix: recover from error on new command

Second issue introduced in commit a2451aa26. It's worth checking error
recovery in the simpler test, even though it's technically caught in the
next one. A little redundancy seems good here.
This commit is contained in:
Kartik K. Agaram 2023-04-22 17:48:54 -07:00
parent f994d61f96
commit f41a1fc69d
2 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,12 @@ record those here.
on.draw = function(
```
Hit F4. Driver shows an error under the definition.
Fix the definition:
```
on.draw = function()
end
```
Hit F4. The error disappears.
* clone this repo to a new client app, clear its save dir, run it, run the
driver, add a definition containing invalid Lua:

View File

@ -94,6 +94,7 @@ function live.update(dt)
local buf = live.receive_from_driver()
if buf then
live.run(buf)
Mode = 'run'
if on.code_change then on.code_change() end
end
Live.previous_read = Current_time