From 0634969b02805b85ec92fe028da474743d1f864d Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 10 Feb 2021 15:45:17 -0500 Subject: [PATCH] Fix linking in standalone mode --- ui/linkgen/linkgen.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/linkgen/linkgen.go b/ui/linkgen/linkgen.go index ed0515db..e3a6ec0f 100644 --- a/ui/linkgen/linkgen.go +++ b/ui/linkgen/linkgen.go @@ -39,7 +39,9 @@ type errMsg struct { // NewProgram is a simple wrapper for tea.NewProgram. For use in standalone // mode. func NewProgram(cfg *charm.Config) *tea.Program { - return tea.NewProgram(NewModel(cfg)) + m := NewModel(cfg) + m.standalone = true + return tea.NewProgram(m) } // Model is the tea model for the link initiator program. @@ -95,6 +97,7 @@ func NewModel(cfg *charm.Config) Model { return Model{ lh: lh, standalone: false, + cfg: cfg, Quit: false, Exit: false, err: nil,