diff options
| author | Jeff Carr <[email protected]> | 2025-02-06 01:42:40 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-06 01:42:40 -0600 |
| commit | 31c130045d903b3c874dbf8728589a6a909704ae (patch) | |
| tree | 0abb0bdedd03b7556c08ca86ef1137dc759e4d8a /plugin.go | |
| parent | 70a742c98acfe8979bb3c040abd6030388e61542 (diff) | |
add a goroutine and channel to trigger window redraw
Diffstat (limited to 'plugin.go')
| -rw-r--r-- | plugin.go | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -182,3 +182,22 @@ func (tk *guiWidget) SetText(text string) { tk.Show() } } + +func (tk *guiWidget) GetText() string { + if tk == nil { + log.Log(NOW, "widget is nil") + return "" + } + // deprecate this + if tk.labelN != "" { + return tk.labelN + } + if tk.node == nil { + // return gocui.view name? + return tk.cuiName + } + if tk.node.State.Label != "" { + return tk.node.State.Label + } + return "" +} |
