소스 검색

fix(root): batch inner command with tview.QuitCommand{} to force quit

ayn2op 1 개월 전
부모
커밋
b0029dd812
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      internal/ui/root/view.go

+ 3 - 2
internal/ui/root/view.go

@@ -72,10 +72,11 @@ func (v *View) HandleEvent(event tcell.Event) tview.Command {
 			v.suspend()
 			return nil
 		case keybind.Matches(event, v.cfg.Keybinds.Quit.Keybind):
+			var innerCmd tview.Command
 			if v.inner != nil {
-				return v.inner.HandleEvent(chat.NewQuitEvent())
+				innerCmd = v.inner.HandleEvent(chat.NewQuitEvent())
 			}
-			return tview.QuitCommand{}
+			return tview.BatchCommand{innerCmd, tview.QuitCommand{}}
 		}
 	}