9089e9ec83
Directly using Go's time.AfterFunc() from lua is tricky. First, it requires the lua timer callback to explicitly lock ulua.Lock to prevent races. Second, it requires the lua timer callback to explicitly redraw the screen if the callback changes the screen contents (see #2923). So instead provide micro's own timer API which ensures both synchronization and redrawing on its own, instead of leaving this burden to lua code. In fact, its implementation runs the lua timer callback in the main micro's goroutine (i.e. from micro's perspective it is synchronous, not asynchronous), so both redrawing and synchronization are ensured automatically. Fixes #2923 |
||
---|---|---|
.. | ||
colors.md | ||
commands.md | ||
copypaste.md | ||
defaultkeys.md | ||
help.md | ||
keybindings.md | ||
options.md | ||
plugins.md | ||
tutorial.md |