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.
This commit is contained in:
parent
956f1366a5
commit
0ce1d42bda
1 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,10 @@ func (tabs *Tabs) Remove(content Drawable) {
|
||||||
index, ok := tabs.popHistory()
|
index, ok := tabs.popHistory()
|
||||||
if ok {
|
if ok {
|
||||||
tabs.Select(index)
|
tabs.Select(index)
|
||||||
|
interactive, ok := tabs.Tabs[tabs.Selected].Content.(Interactive)
|
||||||
|
if ok {
|
||||||
|
interactive.Focus(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tabs.TabStrip.Invalidate()
|
tabs.TabStrip.Invalidate()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue