From b8c7afc9e97ced462d5c6c5cc5290ba1017bf6a6 Mon Sep 17 00:00:00 2001 From: Jonathan Daugherty Date: Thu, 9 Nov 2023 16:33:37 -0800 Subject: [PATCH] defaultMain: shut down Vty handle returned by customMainWithDefaultVty --- src/Brick/Main.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Brick/Main.hs b/src/Brick/Main.hs index 98fa33a..043dc64 100644 --- a/src/Brick/Main.hs +++ b/src/Brick/Main.hs @@ -131,8 +131,10 @@ defaultMain :: (Ord n) -> s -- ^ The initial application state. -> IO s -defaultMain app st = - fst <$> customMainWithDefaultVty Nothing app st +defaultMain app st = do + (s, vty) <- customMainWithDefaultVty Nothing app st + shutdown vty + return s -- | A simple main entry point which takes a widget and renders it. This -- event loop terminates when the user presses any key, but terminal