summaryrefslogtreecommitdiff
path: root/tab.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-05-09 18:50:16 -0500
committerJeff Carr <[email protected]>2023-05-09 18:50:16 -0500
commitc36725fa90acc47fe5c0650f93540b5d65a126b6 (patch)
tree287e41eecaa606aa0714e6e2126327c8aa83aa14 /tab.go
parentb392c40969e105b00efa262042d647303d6fbc2c (diff)
simplify sendAction()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tab.go')
-rw-r--r--tab.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tab.go b/tab.go
index 59f6496..10c2e08 100644
--- a/tab.go
+++ b/tab.go
@@ -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
}