From 546b172be2cd228d1705e25e2057ca973a17769e Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 13 Sep 2025 09:46:48 +0100 Subject: [PATCH] dev:ui:transaction, error screens: fix for third fix --- hledger-ui/Hledger/UI/ErrorScreen.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hledger-ui/Hledger/UI/ErrorScreen.hs b/hledger-ui/Hledger/UI/ErrorScreen.hs index b6864d007..3260d8786 100644 --- a/hledger-ui/Hledger/UI/ErrorScreen.hs +++ b/hledger-ui/Hledger/UI/ErrorScreen.hs @@ -114,15 +114,15 @@ esHandle ev = do -- XXX On an error screen below the transaction screen, this is tricky because of a current limitation of regenerateScreens. -- For now we try to work around by re-entering the transaction screen. -- This can show flicker in the UI and it's hard to handle all situations robustly. - esReload copts d ui = uiReload copts d ui >>= maybeReloadErrorScreen d - esReloadIfFileChanged copts d j ui = liftIO (uiReloadIfFileChanged copts d j ui) >>= maybeReloadErrorScreen d - maybeReloadErrorScreen d ui = + esReload copts d ui = uiReload copts d ui >>= maybeReloadErrorScreen copts d + esReloadIfFileChanged copts d j ui = liftIO (uiReloadIfFileChanged copts d j ui) >>= maybeReloadErrorScreen copts d + maybeReloadErrorScreen copts d ui = case headMay $ aPrevScreens ui of Just (TS _) -> do -- check balance assertions, exit to register screen, enter transaction screen, reload once more put' $ popScreen $ popScreen $ uiCheckBalanceAssertions d ui sendVtyEvents [EvKey KEnter [], EvKey (KChar 'g') []] -- XXX Might be disrupted if other events are queued ? - _ -> return () + _ -> uiReload copts d (popScreen ui) >>= put' . uiCheckBalanceAssertions d -- | Parse the file name, line and column number from a hledger parse error message, if possible. -- Temporary, we should keep the original parse error location. XXX