diff options
| author | Jeff Carr <[email protected]> | 2023-04-24 08:45:30 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-24 08:45:30 -0500 |
| commit | cd998e95c1bae4e5e31ef9dced6d8f3c0095d46e (patch) | |
| tree | feedbd085d32aa489446af3a605c61615272dfbc | |
| parent | 7006281da1053661a50acec0bcb9aa94cbbcf199 (diff) | |
try to find the parent window
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | tab.go | 9 | ||||
| -rw-r--r-- | toolkit/gocui/showStdout.go | 5 |
2 files changed, 7 insertions, 7 deletions
@@ -12,13 +12,18 @@ func (n *Node) NewTab(text string) *Node { if (n.WidgetType != toolkit.Window) { // figure out what the actual window is - log(logError, "NewTab() is being requested on something that isn't a Window") + log(logError, "NewTab() is being requested on something that isn't a Window. node =", n) + log(logError, "NewTab() parent", n.parent) + return n.parent.NewTab(text) + /* if (n.parent.WidgetType == toolkit.Window) { - return n.parent.NewTab(text) } else { + if (n.parent.WidgetType == toolkit.Window) { + return n.parent.NewTab(text) // TODO: find a window. any window. never give up. never die. panic("NewTab did not get passed a window") } + */ } newNode := n.newNode(text, toolkit.Tab, nil) diff --git a/toolkit/gocui/showStdout.go b/toolkit/gocui/showStdout.go index c367ab9..d6469f7 100644 --- a/toolkit/gocui/showStdout.go +++ b/toolkit/gocui/showStdout.go @@ -1,7 +1,3 @@ -// Copyright 2014 The gocui Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - package main import ( @@ -34,7 +30,6 @@ func showMsg(g *gocui.Gui, v *gocui.View) error { if l, err = v.Line(cy); err != nil { l = "" } - // setOutput(me.rootNode) makeOutputWidget(g, l) return nil |
