Get rid of world hammers
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user