Reintroduce section-wide indentation

This commit is contained in:
2024-11-24 10:57:09 +00:00
parent 9529185319
commit 426b81abb9
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
All good (594 modules, at 10:49:27)
All good (594 modules, at 10:56:37)
+1
View File
@@ -31,6 +31,7 @@ data SelectionSection a = SelectionSection
{ _ssItems :: IntMap (SelectionItem a)
, _ssOffset :: Int
, _ssShownItems :: [Picture]
, _ssIndent :: Int
}
type IMSS a = IntMap (SelectionSection a)
+1
View File
@@ -190,6 +190,7 @@ defaultSS =
{ _ssItems = mempty
, _ssOffset = 0
, _ssShownItems = []
, _ssIndent = 0
}
defaultCOSection :: SelectionSection ()
+4 -6
View File
@@ -312,9 +312,7 @@ updateSection sis mcsel availablelines ss =
moredowncolor = fromMaybe white $ allstrings ^? ix (offset + availablelines - 1) . _1
allstrings = listSelectionColorPicture sis
shownstrings = drop offset allstrings
--h (_, str) = translate (fromIntegral (_ssIndent ss) * 100) 0 str
h (_, str) = str
-- theindent = replicate (_ssIndent ss) ' '
listSelectionColorPicture :: Foldable t => t (SelectionItem a) -> [(Color, Picture)]
listSelectionColorPicture = foldMap f
@@ -347,9 +345,9 @@ enterCombineInv cfig w =
filtsection =
SelectionSection
{ _ssItems = mempty
, -- , _ssMinSize = 0
_ssOffset = 0
, _ssOffset = 0
, _ssShownItems = mempty
, _ssIndent = 0
}
combsection =
updateSection
@@ -358,9 +356,9 @@ enterCombineInv cfig w =
availablelines
SelectionSection
{ _ssItems = cm
, -- , _ssMinSize = 5
_ssOffset = 0
, _ssOffset = 0
, _ssShownItems = mempty
, _ssIndent = 0
}
regexList :: String -> [String] -> Bool