repl: add toggle start/stop shortcut

This commit is contained in:
Norwin 2022-01-02 07:17:16 +01:00
parent da3c05bfe4
commit 69bb57a560
1 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,13 @@ func RunREPL(f Fluter) {
case "start": case "start":
t.Paused = false t.Paused = false
case "toggle", ".":
t.Paused = !t.Paused
if t.Paused {
f.stopTask()
printTask = false
}
case "offset", "of": case "offset", "of":
if len(args) == 1 && args[0] == "rand" { if len(args) == 1 && args[0] == "rand" {
t.RandOffset = true t.RandOffset = true