aboutsummaryrefslogtreecommitdiff
path: root/core.go
diff options
context:
space:
mode:
Diffstat (limited to 'core.go')
-rw-r--r--core.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core.go b/core.go
index 5ffe7cb..32f37fb 100644
--- a/core.go
+++ b/core.go
@@ -54,8 +54,8 @@ func (c *Core) LoadFile(fname string) error {
}
// Run evaluates content of memory
-func (c *Core) Run() {
- ctx, cancel := context.WithCancel(context.Background())
+func (c *Core) Run(ctx context.Context) {
+ ctx, cancel := context.WithCancel(ctx)
c.tty = NewConsole(ctx)
c.stop = cancel
for {