warning cleanup

This commit is contained in:
pdlla 2021-02-21 09:17:27 -08:00
parent ce7cece8f9
commit 3d173059fc
2 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ test-suite reflex-vty-test
type: exitcode-stdio-1.0
ghc-options: -threaded
other-modules:
Data.Text.Zipper
Data.Text.ZipperSpec
build-depends:
base,
reflex,

View File

@ -513,8 +513,8 @@ wrapWithOffsetAndAlignment
-> Text -- ^ Text to be wrapped
-> [(Text,Bool,Int)] -- (words on that line, hidden space char, offset from beginning of line)
wrapWithOffsetAndAlignment _ maxWidth _ _ | maxWidth <= 0 = []
wrapWithOffsetAndAlignment alignment maxWidth n text = assert (n <= maxWidth) r where
r' = splitWordsAtDisplayWidth maxWidth $ T.replicate n " " : wordsWithWhitespace text
wrapWithOffsetAndAlignment alignment maxWidth n txt = assert (n <= maxWidth) r where
r' = splitWordsAtDisplayWidth maxWidth $ T.replicate n " " : wordsWithWhitespace txt
fmapfn (t,b) = case alignment of
TextAlignment_Left -> (t,b,0)
TextAlignment_Right -> (t,b,maxWidth-l)
@ -527,7 +527,7 @@ wrapWithOffsetAndAlignment alignment maxWidth n text = assert (n <= maxWidth) r
-- converts deleted eol spaces into logical lines
eolSpacesToLogicalLines :: [[(Text, Bool, Int)]] -> [[(Text, Int)]]
eolSpacesToLogicalLines = fmap (fmap (\(a, b, c) -> (a,c))) . join . fmap (L.groupBy (\(_,b,_) _ -> not b))
eolSpacesToLogicalLines = fmap (fmap (\(a, _, c) -> (a,c))) . join . fmap (L.groupBy (\(_,b,_) _ -> not b))
offsetMapWithAlignmentInternal :: [[(Text, Bool, Int)]] -> OffsetMapWithAlignment
offsetMapWithAlignmentInternal = offsetMapWithAlignment . eolSpacesToLogicalLines