From 5d1bb5c2ad89dc3a2e442abac3ea7b79eef6f101 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 12 Sep 2025 09:57:21 +0100 Subject: [PATCH] ;dev:ui:ErrorScreen: note possible updating issue after E key --- hledger-ui/Hledger/UI/ErrorScreen.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hledger-ui/Hledger/UI/ErrorScreen.hs b/hledger-ui/Hledger/UI/ErrorScreen.hs index 005a6a3c9..19d7937e3 100644 --- a/hledger-ui/Hledger/UI/ErrorScreen.hs +++ b/hledger-ui/Hledger/UI/ErrorScreen.hs @@ -89,6 +89,8 @@ esHandle ev = do VtyEvent (EvKey KEsc []) -> put' $ uiCheckBalanceAssertions d $ resetScreens d ui VtyEvent (EvKey (KChar c) []) | c `elem` ['h','?'] -> put' $ setMode Help ui VtyEvent (EvKey (KChar 'E') []) -> suspendAndResume $ void (runEditor pos f) >> uiReloadIfFileChanged copts d j (popScreen ui) + -- XXX put ? uiCheckBalanceAssertions ? + -- does the error screen update the state, and check balance assertions, after running editor ? where (pos,f) = case parsewithString hledgerparseerrorpositionp _essError of Right (f',l,c) -> (Just (l, Just c),f') @@ -134,7 +136,7 @@ hledgerparseerrorpositionp = do -- | Reload the journal from its input files, then update the ui app state accordingly. -- This means regenerate the entire screen stack from top level down to the current screen, using the provided today-date. --- Or if journal reloading fails, enter the error screen; or if already there, update its message. +-- As a convenience (usually), if journal reloading fails, this enters the error screen, or if already there, updates its message. -- -- The provided cli options can influence reloading; then if reloading succeeds they are saved in the ui state, -- otherwise the UIState keeps its old options. (XXX needed for.. ?)