Cleanup
This commit is contained in:
@@ -186,16 +186,15 @@ updateSection ::
|
||||
SelectionSection a
|
||||
updateSection sis mcsel availablelines ss =
|
||||
ss
|
||||
{ _ssItems = sis
|
||||
, _ssCursor = scurs
|
||||
, _ssOffset = offset
|
||||
, _ssShownItems = shownitems
|
||||
}
|
||||
& ssItems .~ sis
|
||||
& ssCursor .~ scurs
|
||||
& ssOffset .~ offset
|
||||
& ssShownItems .~ shownitems
|
||||
where
|
||||
oldoffset = ss ^. ssOffset
|
||||
scurs = do
|
||||
csel <- mcsel
|
||||
(_, si) <- IM.lookupGE csel sis -- this is not right
|
||||
(_, si) <- IM.lookupGE csel sis -- this is not right?
|
||||
let cpos = sum (fmap (length . _siPictures) . fst . IM.split csel $ sis)
|
||||
csize = length $ _siPictures si
|
||||
ccolor = _siColor si
|
||||
@@ -238,7 +237,7 @@ updateSection sis mcsel availablelines ss =
|
||||
| length shownstrings > availablelines =
|
||||
tweakfirst (take (availablelines - 1) shownstrings)
|
||||
-- ++ [xtra ">>>"]
|
||||
++ [translate 0 100 . color moredowncolor . vMirrorText $ theindent ++ replicate 15 '^']
|
||||
++ [translate 0 100 . color moredowncolor . textVMirror $ theindent ++ replicate 15 '^']
|
||||
| otherwise = tweakfirst shownstrings
|
||||
moredowncolor = fromMaybe white $ allstrings ^? ix (offset + availablelines - 1) . _1
|
||||
allstrings :: [(Color, String)]
|
||||
@@ -246,7 +245,7 @@ updateSection sis mcsel availablelines ss =
|
||||
shownstrings = drop offset allstrings
|
||||
h (col, str) = color col . text $ theindent ++ str
|
||||
theindent = replicate (_ssIndent ss) ' '
|
||||
xtra str = color white . text $ theindent ++ str ++ " MORE " ++ _ssDescriptor ss
|
||||
--xtra str = color white . text $ theindent ++ str ++ " MORE " ++ _ssDescriptor ss
|
||||
g si = map (_siColor si,) $ _siPictures si
|
||||
|
||||
enterCombineInv :: Configuration -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user