on develop help sign in
Line wrapping: Fix wrapping of trailing lines
commitf162842c1d8ad577d39b885e8f5c0c6f5ea9cf51 authorAli Abrar <aliabrar@gmail.com> dateSat 3 Nov 2018, 22:34 (8 years ago) parent7cd833b
1 file changed+2−1
src/Reflex/Vty/Widget.hs+2−1
src/Reflex/Vty/Widget.hs+2−1
@@ -471,6 +471,7 @@ wrapInputState maxWidth attrs cursorAttrs (InputState before after) =
471471 Nothing -> (top', midB, ' ', "", bottom')
472472 Just (c, rest) -> (top', midB, c, rest, bottom')
473473 wrappedTop = wrap top
474+ wrappedBottom = wrap bottom
474475 (midBeforeTop, midBefore') = fromMaybe ([], "") $ initLast $ wrap [midBefore]
475476 cursorAfterEOL = T.length midBefore' == maxWidth
476477 (midAfter', midAfterBottom) =
@@ -498,7 +499,7 @@ wrapInputState maxWidth attrs cursorAttrs (InputState before after) =
498499 ]
499500 ]
500501 , vstring <$> midAfterBottom
501− , vstring <$> bottom
502+ , vstring <$> wrappedBottom
502503 ]
503504 cursorY = length wrappedTop + length midBeforeTop + if cursorAfterEOL then 1 else 0
504505 in (images, cursorY)