mirror of
https://github.com/ilyakooo0/reflex-vty.git
synced 2024-11-23 03:13:26 +03:00
warning cleanup
This commit is contained in:
parent
ce7cece8f9
commit
3d173059fc
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user