Cleanup
This commit is contained in:
@@ -230,7 +230,7 @@ updateSection sis mcsel availablelines ss =
|
||||
ss
|
||||
& ssItems .~ sis
|
||||
& ssOffset .~ offset
|
||||
& ssShownItems .~ shownitems
|
||||
& ssShownItems .~ tweakfirst shownitems
|
||||
where
|
||||
oldoffset = ss ^. ssOffset
|
||||
nocursoroffset =
|
||||
@@ -261,16 +261,16 @@ updateSection sis mcsel availablelines ss =
|
||||
_ -> oldoffset
|
||||
tweakfirst (x : xs)
|
||||
| offset > 0 =
|
||||
translate 0 (-100) (color moreupcolor $ text (theindent ++ replicate 15 '^')) :
|
||||
map h xs
|
||||
| otherwise = map h (x : xs)
|
||||
(color moreupcolor $ text (theindent ++ replicate 15 (toEnum 30))) :
|
||||
xs
|
||||
| otherwise = (x : xs)
|
||||
tweakfirst [] = []
|
||||
moreupcolor = fromMaybe white $ allstrings ^? ix offset . _1
|
||||
shownitems
|
||||
| length shownstrings > availablelines =
|
||||
tweakfirst (take (availablelines - 1) shownstrings)
|
||||
++ [translate 0 100 . color moredowncolor . textVMirror $ theindent ++ replicate 15 '^']
|
||||
| otherwise = tweakfirst shownstrings
|
||||
(map h $ take (availablelines - 1) shownstrings)
|
||||
++ [color moredowncolor . text $ theindent ++ replicate 15 (toEnum 31)]
|
||||
| otherwise = map h shownstrings
|
||||
moredowncolor = fromMaybe white $ allstrings ^? ix (offset + availablelines - 1) . _1
|
||||
allstrings = listSelectionColorPicture sis
|
||||
shownstrings = drop offset allstrings
|
||||
|
||||
Reference in New Issue
Block a user