File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ func (m *mainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
235235 var cmds []tea.Cmd
236236 searchWasActive := false
237237 filterWasActive := false
238+ splitWasOpen := false
238239
239240 if keyMsg , ok := msg .(tea.KeyPressMsg ); ok && keyMsg .String () == config .Keybinds .Global .Cancel {
240241 switch current := m .current .(type ) {
@@ -246,6 +247,7 @@ func (m *mainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
246247 searchWasActive = inbox .IsSearchActive ()
247248 filterWasActive = inbox .IsFilterActive ()
248249 }
250+ splitWasOpen = current .HasSplitPreview ()
249251 }
250252 }
251253
@@ -287,7 +289,7 @@ func (m *mainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
287289 case * tui.FilePicker :
288290 return m , func () tea.Msg { return tui.CancelFilePickerMsg {} }
289291 case * tui.FolderInbox , * tui.Inbox , * tui.Login :
290- if searchWasActive || filterWasActive {
292+ if searchWasActive || filterWasActive || splitWasOpen {
291293 return m , tea .Batch (cmds ... )
292294 }
293295 m .idleWatcher .StopAll ()
Original file line number Diff line number Diff line change @@ -685,6 +685,11 @@ func (m *FolderInbox) GetCurrentFolder() string {
685685 return m .currentFolder
686686}
687687
688+ // HasSplitPreview reports whether the split preview pane is currently open.
689+ func (m * FolderInbox ) HasSplitPreview () bool {
690+ return m .previewPane != nil
691+ }
692+
688693// GetInbox returns the embedded inbox.
689694func (m * FolderInbox ) GetInbox () * Inbox {
690695 return m .inbox
You can’t perform that action at this time.
0 commit comments