diff options
author | Jeffas <dev@jeffas.io> | 2019-09-16 17:39:03 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-09-18 19:20:49 -0400 |
commit | 0ce1d42bda406a1d7c83df462206f435a841a809 (patch) | |
tree | 97f053d77c16459c52cfb18370136c2ed7d1c90e /lib/ui | |
parent | 956f1366a538f4cbd0f300083871196c4c759d44 (diff) |
Focus new tab after remove
After removing a tab we should focus the newly selected tab if it is
Interactive. This ensures things like the terminal get drawn properly.
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/tab.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 1fd2b80..9c19cd7 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -77,6 +77,10 @@ func (tabs *Tabs) Remove(content Drawable) { index, ok := tabs.popHistory() if ok { tabs.Select(index) + interactive, ok := tabs.Tabs[tabs.Selected].Content.(Interactive) + if ok { + interactive.Focus(true) + } } tabs.TabStrip.Invalidate() } |