ui: after exiting --register, select that account

This commit is contained in:
Simon Michael 2015-09-03 20:51:05 -07:00
parent 472b0aee75
commit ebc4022888
2 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,9 @@
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecordWildCards #-}
module Hledger.UI.AccountsScreen module Hledger.UI.AccountsScreen
(screen) (screen
,initAccountsScreen
)
where where
import Control.Lens ((^.)) import Control.Lens ((^.))

View File

@ -101,13 +101,12 @@ runBrickUi uopts@UIOpts{cliopts_=copts@CliOpts{reportopts_=ropts}} j = do
$ filter (regexMatches apat) $ journalAccountNames j $ filter (regexMatches apat) $ journalAccountNames j
-- Initialising the accounts screen is awkward, requiring -- Initialising the accounts screen is awkward, requiring
-- another temporary AppState value.. -- another temporary AppState value..
ascr = AS.screen
ascr' = aScreen $ ascr' = aScreen $
(sInitFn ascr) d AS.initAccountsScreen (Just acct) d -- acct will be selected
AppState{ AppState{
aopts=uopts' aopts=uopts'
,ajournal=j ,ajournal=j
,aScreen=ascr ,aScreen=AS.screen
,aPrevScreens=[] ,aPrevScreens=[]
} }