mirror of
https://github.com/CrystalSplitter/ghcitui.git
synced 2024-09-11 10:55:29 +03:00
Wrap around module selections
This commit is contained in:
parent
34e494df37
commit
3661ebbbc7
@ -222,7 +222,10 @@ changeReplWidgetSize amnt s =
|
||||
|
||||
changeSelectedModuleInInfoPanel :: Int -> AppState n -> AppState n
|
||||
changeSelectedModuleInInfoPanel amnt s =
|
||||
s{_infoPanelSelectedModule = _infoPanelSelectedModule s + amnt}
|
||||
s{_infoPanelSelectedModule = newSelection }
|
||||
where
|
||||
newSelection = (_infoPanelSelectedModule s + amnt) `mod` numModules
|
||||
numModules = length (Loc.moduleFileMapAssocs (Daemon.moduleFileMap (interpState s)))
|
||||
|
||||
getSelectedModuleInInfoPanel :: AppState n -> Int
|
||||
getSelectedModuleInInfoPanel = _infoPanelSelectedModule
|
||||
|
Loading…
Reference in New Issue
Block a user