diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ui/tab.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 7d1ce63..4b99e4b 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -1,6 +1,8 @@ package ui import ( + "io" + "github.com/gdamore/tcell" "github.com/mattn/go-runewidth" @@ -107,6 +109,9 @@ func (tabs *Tabs) Replace(contentSrc Drawable, contentTarget Drawable, name stri if tab.Content == contentSrc { tabs.Tabs[i] = replaceTab tabs.Select(i) + if c, ok := contentSrc.(io.Closer); ok { + c.Close() + } break } } |