Get rid of world hammers

This commit is contained in:
2023-01-16 01:52:12 +00:00
parent 43e3c1fe4c
commit 5810c2262a
9 changed files with 40 additions and 86 deletions
+2 -4
View File
@@ -1,12 +1,10 @@
module Dodge.SelectionList where
--import Color
--import Dodge.WindowLayout
import Color
import Regex
import Dodge.Data.Universe
import LensHelp
--import Data.Maybe
import Data.Maybe
getAvailableListLines :: ListDisplayParams -> Configuration -> Int
getAvailableListLines ldps cfig = floor ((dToBot - vgap) / itmHeight)
@@ -42,7 +40,7 @@ moveSelectionListSelection :: Int -> SelectionList a -> SelectionList a
moveSelectionListSelection yi sl = sl & slSelPos %~ f
where
f x | maxsel == 0 = Nothing
| x == Nothing = Just 0
| isNothing x = Just 0
| otherwise = fmap ((`mod` maxsel) . subtract yi) x
maxsel = case _slRegex sl of
"" -> length (_slItems sl)