Update changes in menu values

This commit is contained in:
2022-12-21 16:08:22 +00:00
parent 03c945d189
commit 91d65094c9
4 changed files with 14 additions and 11 deletions
+2 -4
View File
@@ -7,11 +7,9 @@ import LensHelp
setShownSelectionItems :: SelectionList -> SelectionList
setShownSelectionItems sl = case sl ^? slSizeRestriction of
Just (SelectionSizeRestriction maxlines _ botit _)
| length allitems <= maxlines -> sl & slShownItems .~ allitems
-- | offset > length allitems + 3 - maxlines -> sl
| otherwise ->
| length allitems > maxlines ->
sl & slShownItems .~ take (maxlines - 2) (drop offset allitems) -- ++ repeat dummyitem))
++ [(botit,ScrollDownSelectionItem)]
++ [(botit,ScrollSelectionItem)]
_ -> sl & slShownItems .~ allitems
where
-- dummyitem = (SelectionItem [] 1 False 0 white 0, DummySelectionItem)