From 09eb41fd16dd9640a847d029fab8ec0a3e1c8c15 Mon Sep 17 00:00:00 2001 From: Caleb Foust Date: Mon, 13 Nov 2023 19:19:31 -0500 Subject: [PATCH] fix: bug with replay binds in cmd --- pkg/cy/api/cmd.go | 8 ++++---- pkg/cy/janet.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/cy/api/cmd.go b/pkg/cy/api/cmd.go index cca5e43c..a889ed98 100644 --- a/pkg/cy/api/cmd.go +++ b/pkg/cy/api/cmd.go @@ -20,9 +20,9 @@ type CmdParams struct { } type Cmd struct { - Lifetime util.Lifetime - Tree *tree.Tree - replayBinds *bind.BindScope + Lifetime util.Lifetime + Tree *tree.Tree + Binds *bind.BindScope } func (c *Cmd) New( @@ -53,7 +53,7 @@ func (c *Cmd) New( Directory: path, }, dataDir, - c.replayBinds, + c.Binds, ) if err != nil { return 0, err diff --git a/pkg/cy/janet.go b/pkg/cy/janet.go index d83fe5a4..8a64a37f 100644 --- a/pkg/cy/janet.go +++ b/pkg/cy/janet.go @@ -88,6 +88,7 @@ func (c *Cy) initJanet(ctx context.Context, dataDir string) (*janet.VM, error) { "cmd": &api.Cmd{ Lifetime: util.NewLifetime(c.Ctx()), Tree: c.tree, + Binds: c.replayBinds, }, "group": &api.GroupModule{Tree: c.tree}, "pane": &api.PaneModule{Tree: c.tree},