ui: accounts: fix an earlier refactoring, helping selection persistence
This commit is contained in:
parent
4927711490
commit
9ba8465421
@ -252,11 +252,11 @@ asHandle st'@AppState{
|
|||||||
case mode of
|
case mode of
|
||||||
Minibuffer ed ->
|
Minibuffer ed ->
|
||||||
case ev of
|
case ev of
|
||||||
Vty.EvKey Vty.KEsc [] -> continue $ stCloseMinibuffer st'
|
Vty.EvKey Vty.KEsc [] -> continue $ stCloseMinibuffer st
|
||||||
Vty.EvKey Vty.KEnter [] -> continue $ regenerateScreens j d $ stFilter s $ stCloseMinibuffer st'
|
Vty.EvKey Vty.KEnter [] -> continue $ regenerateScreens j d $ stFilter s $ stCloseMinibuffer st
|
||||||
where s = chomp $ unlines $ getEditContents ed
|
where s = chomp $ unlines $ getEditContents ed
|
||||||
ev -> do ed' <- handleEvent ev ed
|
ev -> do ed' <- handleEvent ev ed
|
||||||
continue $ st'{aMode=Minibuffer ed'}
|
continue $ st{aMode=Minibuffer ed'}
|
||||||
|
|
||||||
Help ->
|
Help ->
|
||||||
case ev of
|
case ev of
|
||||||
@ -299,10 +299,10 @@ asHandle st'@AppState{
|
|||||||
-- fall through to the list's event handler (handles up/down)
|
-- fall through to the list's event handler (handles up/down)
|
||||||
ev -> do
|
ev -> do
|
||||||
newitems <- handleEvent ev (scr ^. asList)
|
newitems <- handleEvent ev (scr ^. asList)
|
||||||
continue $ st'{aScreen=scr & asList .~ newitems
|
continue $ st{aScreen=scr & asList .~ newitems
|
||||||
& asSelectedAccount .~ selacct
|
& asSelectedAccount .~ selacct
|
||||||
}
|
}
|
||||||
-- continue =<< handleEventLensed st' someLens ev
|
-- continue =<< handleEventLensed st someLens ev
|
||||||
|
|
||||||
where
|
where
|
||||||
-- Encourage a more stable scroll position when toggling list items.
|
-- Encourage a more stable scroll position when toggling list items.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user