1
0
mirror of https://git.sr.ht/~sircmpwn/aerc synced 2026-01-10 08:51:34 +01:00

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:
Jeffas 2019-09-16 17:39:03 +01:00 committed by Drew DeVault
parent 956f1366a5
commit 0ce1d42bda

@ -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()
}