diff options
| author | Jeff Carr <[email protected]> | 2023-05-09 18:50:16 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-05-09 18:50:16 -0500 |
| commit | c36725fa90acc47fe5c0650f93540b5d65a126b6 (patch) | |
| tree | 287e41eecaa606aa0714e6e2126327c8aa83aa14 /tab.go | |
| parent | b392c40969e105b00efa262042d647303d6fbc2c (diff) | |
simplify sendAction()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tab.go')
| -rw-r--r-- | tab.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -30,12 +30,12 @@ func (n *Node) NewTab(text string) *Node { } newNode := n.newNode(text, toolkit.Tab, nil) - var a toolkit.Action - a.ActionType = toolkit.Add - a.Name = text - a.Text = text - newaction(&a, newNode, n) + a := newAction(newNode, toolkit.Add) + sendAction(a, newNode, n) + // by default, create a box inside the tab + // TODO: allow this to be configurable newBox := newNode.NewBox(text, true) + return newBox } |
