Fix error flashes replacing focused pane

This commit is contained in:
2026-05-15 19:27:42 +01:00
parent fd9c19e5c2
commit 878e9370bc
3 changed files with 49 additions and 1 deletions

View File

@@ -2268,8 +2268,17 @@ func (st *uiState) flashError(msg string) {
st.mu.Lock()
st.attentionText = msg
st.attentionAt = "" // shows on every focus until cleared
focusedPad := st.focusedPad
focusedID := st.focusedID
st.mu.Unlock()
st.renderEmptyState()
switch {
case focusedPad != "":
st.repaintFocusedPad()
case focusedID != "":
st.repaintFocused()
default:
st.renderEmptyState()
}
st.drawTabBar()
st.drawSidebar()
st.drawStatusLine()